Ejemplo n.º 1
0
 /**
  * Magic getter for retrieving convenience properties.
  *
  * @param string $property The name of the property to retrieve
  *
  * @return mixed
  */
 public function __get($property)
 {
     switch ($property) {
         case 'contentTypeIdentifier':
             return $this->innerContentType->identifier;
         case 'contentTypeName':
             return $this->getTranslatedString($this->languageCode, (array) $this->innerContentType->getNames());
         case 'contentTypeDescription':
             return $this->getTranslatedString($this->languageCode, (array) $this->innerContentType->getDescriptions());
     }
     if (property_exists($this, $property)) {
         return $this->{$property};
     } elseif (property_exists($this->innerContentInfo, $property)) {
         return $this->innerContentInfo->{$property};
     }
     return parent::__get($property);
 }
 /**
  * This method returns the human readable name in all provided languages
  * of the content type
  *
  * The structure of the return value is:
  * <code>
  * array( 'eng' => '<name_eng>', 'de' => '<name_de>' );
  * </code>
  *
  * @return string[]
  */
 public function getNames()
 {
     return $this->innerContentType->getNames();
 }