Example #1
0
 public function __construct($cellDefinition)
 {
     parent::__construct($cellDefinition);
     $this->grid = new Grid(Hash::get($cellDefinition, 'meta.grid.colWidth', 0), Hash::get($cellDefinition, 'meta.grid.baseWidth', 0));
     foreach ($cellDefinition['data'] as $moduleDefintion) {
         $this->data[] = new Module($moduleDefintion);
     }
 }
Example #2
0
 public function __construct($moduleDefintion)
 {
     parent::__construct($moduleDefintion);
     $moduleClass = Hash::get($moduleDefintion, 'meta.moduleId');
     if ($moduleClass) {
         $this->instance = new $moduleClass(Hash::get($moduleDefintion, 'data'));
     }
 }
Example #3
0
 /**
  * Container constructor.
  * @param $containerDefinition
  */
 public function __construct($containerDefinition)
 {
     parent::__construct($containerDefinition);
     $this->meta = $containerDefinition['meta'];
     foreach ($containerDefinition['data'] as $contentElement) {
         $contentType = Hash::get($contentElement, 'meta.type');
         switch ($contentType) {
             case 'Row':
                 $this->data[] = new Row($contentElement);
                 break;
             case 'Module':
                 $this->data[] = new Module($contentElement);
                 break;
         }
     }
 }