Sulu\Component\Content\Mapper\Translation\TranslatedProperty::getName PHP Method

getName() public method

returns name of template.
public getName ( ) : string
return string
    public function getName()
    {
        if ($this->property->getMultilingual()) {
            return $this->languageNamespace . ':' . $this->localization . '-' . ($this->additionalPrefix !== null ? $this->additionalPrefix . '-' : '') . $this->property->getName();
        } else {
            return ($this->additionalPrefix !== null ? $this->additionalPrefix . '-' : '') . $this->property->getName();
        }
    }

Usage Example

Exemplo n.º 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 '';
 }
All Usage Examples Of Sulu\Component\Content\Mapper\Translation\TranslatedProperty::getName