Exemple #1
0
 /**
  * @return mixed|string
  * @throws InvalidStateException
  */
 public function getContent()
 {
     if (!is_null($this->component->getFixedContent())) {
         return $this->component->getFixedContent();
     } elseif (!is_null($this->component->getContentCallback())) {
         return call_user_func($this->component->getContentCallback(), $this->state, $this);
     } elseif (!is_null($this->component->getTranslationKey())) {
         return $this->state->getServices()->getTranslator()->translateRaw($this->component->getTranslationKey(), $this->component, $this->state, $this->component->getTranslationParams());
     }
     return '';
 }
 /**
  * @param Content $content
  */
 protected function buildContentPrototype(Content $content)
 {
     $content->setCssBaseTypeClass('cont')->setComponentBaseType('cont');
 }