예제 #1
0
 public function __construct(Page $page, array $attrs, $slotname, $editable = true)
 {
     parent::__construct($page, $attrs, $slotname, $editable);
     if (isset($this->attrs['target_page_id'])) {
         $this->targetPage = PageFacade::find($this->attrs['target_page_id']);
     }
 }
예제 #2
0
 public function __construct(Page $page, array $attrs, $slotname, $editable)
 {
     parent::__construct($page, $attrs, $slotname, $editable);
     // Formatting is allowed for bodycopy by default.
     // For other text chunks it must be manually set.
     $this->allowFormatting = $this->slotname === 'bodycopy';
 }
예제 #3
0
 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);
         }
     }
 }
예제 #4
0
 public function __construct(Page $page, array $attrs, $slotname, $editable)
 {
     parent::__construct($page, $attrs, $slotname, $editable);
     if (isset($this->attrs['links'])) {
         foreach ($this->attrs['links'] as &$link) {
             $link = new Linkset\Link($link);
         }
     }
 }
예제 #5
0
 public function __construct(Page $page, array $attrs, $slotname, $editable)
 {
     parent::__construct($page, $attrs, $slotname, $editable);
     $this->params = isset($attrs['params']) ? $this->cleanData((array) $attrs['params']) : [];
 }