src/Service/DocumentManagerServices.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Service;
  3. class DocumentManagerServices
  4. {
  5.     protected $documentmanager;
  6.     public function __construct($documentmanager)
  7.     {
  8.         $this->documentmanager $documentmanager;
  9.     }
  10.     public function getPageListLength($locale$template)
  11.     {
  12.         $liste_page $this->documentmanager->createQuery('SELECT * FROM [nt:unstructured] WHERE [jcr:mixinTypes] = "sulu:page"  AND [i18n:' $locale '-template] = "' $template '" AND [i18n:' $locale '-state] = "2"');
  13.         $queryResult $liste_page->execute();
  14.         return sizeof($queryResult);
  15.     }
  16. }