Esempio n. 1
0
 /**
  * Get locale-tags of the paragraph
  *
  * @return array
  */
 function getLocaleTags()
 {
     if ($this->getRenderedMetaContent() instanceof TagsAwareInterface) {
         return array_unique(array_merge(parent::getLocaleTags(), $this->getRenderedMetaContent()->getLocaleTags()));
     }
     return parent::getLocaleTags();
 }
Esempio n. 2
0
 /**
  * @return \Grid\Paragraph\Model\Paragraph\Structure\Content
  */
 public function prepareCreate()
 {
     if (empty($this->created)) {
         $this->created = new DateTime();
     }
     $mapper = $this->getMapper();
     $this->bindChild($mapper->create(array('type' => 'html')));
     return parent::prepareCreate();
 }