getName() public méthode

returns name of template.
public getName ( ) : string
Résultat string
Exemple #1
0
 /**
  * build categories where clauses.
  */
 private function buildCategoriesWhere($categories, $operator, $languageCode)
 {
     $structure = $this->structureManager->getStructure('excerpt');
     $sql2Where = [];
     if ($structure->hasProperty('categories')) {
         $property = new TranslatedProperty($structure->getProperty('categories'), $languageCode, $this->languageNamespace, 'excerpt');
         foreach ($categories as $category) {
             $sql2Where[] = 'page.[' . $property->getName() . '] = ' . $category;
         }
         if (count($sql2Where) > 0) {
             return '(' . implode(' ' . strtoupper($operator) . ' ', $sql2Where) . ')';
         }
     }
     return '';
 }
 /**
  * build tags where clauses.
  */
 private function buildTagsWhere($languageCode)
 {
     $structure = $this->structureManager->getStructure('excerpt');
     $sql2Where = [];
     if ($structure->hasProperty('tags')) {
         $tagOperator = $this->getConfig('tagOperator', 'OR');
         $property = new TranslatedProperty($structure->getProperty('tags'), $languageCode, $this->languageNamespace, 'excerpt');
         foreach ($this->getConfig('tags', []) as $tag) {
             $sql2Where[] = 'page.[' . $property->getName() . '] = ' . $tag;
         }
         if (sizeof($sql2Where) > 0) {
             return '(' . implode(' ' . strtoupper($tagOperator) . ' ', $sql2Where) . ')';
         }
     }
     return '';
 }