예제 #1
0
 /**
  * RelatedMedia constructor.
  * @param Model $model
  */
 public function __construct(Model $model, $args = null)
 {
     parent::__construct();
     $this->actions = ButtonGroup::create();
     $this->parent($model);
     if ($args) {
         $this->child($args[0]);
     }
 }
예제 #2
0
 /**
  * RelatedMedia constructor.
  * @param Model $model
  */
 public function __construct(Model $model, $args = null)
 {
     parent::__construct();
     // The RelatedMedia contract is required by the model.
     if (!$model instanceof \Birdmin\Contracts\RelatedMedia) {
         return $this->canRender = false;
     }
     $this->parent($model);
     $this->dropzone = Dropzone::create()->handler('relate', cms_url('media/upload'))->relate($model);
 }
예제 #3
0
 /**
  * TestHtmlComponent constructor.
  * @param Model $model
  * @param \simple_html_dom_node $node
  */
 public function __construct(Model $model, \simple_html_dom_node $node)
 {
     parent::__construct();
     $this->setup($model, $node);
 }