Exemple #1
0
 public function __construct(Page $page, array $attrs, $slotname)
 {
     parent::__construct($page, $attrs, $slotname);
     if (isset($this->attrs['target_page_id'])) {
         $this->targetPage = PageFacade::find($this->attrs['target_page_id']);
     }
 }
Exemple #2
0
 public function __construct(Page $page, array $attrs, $slotname, $editable = true)
 {
     parent::__construct($page, $attrs, $slotname, $editable);
     if (isset($attrs['asset_id'])) {
         $this->asset = AssetFacade::find($this->attrs['asset_id']);
     }
 }
 public function __construct(Page $page, array $attrs, $slotname, $editable)
 {
     parent::__construct($page, $attrs, $slotname, $editable);
     if (isset($this->attrs['slides'])) {
         foreach ($this->attrs['slides'] as &$slide) {
             $slide = new Slideshow\Slide($slide);
         }
     }
 }
Exemple #4
0
 public function __construct(Page $page, array $attrs, $slotname)
 {
     parent::__construct($page, $attrs, $slotname);
     if (isset($this->attrs['links'])) {
         foreach ($this->attrs['links'] as &$link) {
             $link = new Linkset\Link($link);
         }
     }
 }
Exemple #5
0
 public function getPlaceholderText()
 {
     $placeholder = parent::getPlaceholderText();
     return $this->allowFormatting ? "<p>{$placeholder}</p>" : $placeholder;
 }
Exemple #6
0
 public function __construct(Page $page, array $attrs, $slotname)
 {
     parent::__construct($page, $attrs, $slotname);
     $this->params = isset($attrs['params']) ? $this->cleanData((array) $attrs['params']) : [];
 }