예제 #1
0
파일: Info.php 프로젝트: Umz/ImpressPages
 /**
  * Create field object for grid
  * @param array $fieldFieldConfig config of this particular field
  * @param $wholeConfig whole grid setup config
  * @throws \Ip\Exception
  */
 public function __construct($fieldFieldConfig, $wholeConfig)
 {
     if (!empty($fieldFieldConfig['html'])) {
         $this->html = $fieldFieldConfig['html'];
     }
     return parent::__construct($fieldFieldConfig, $wholeConfig);
 }
예제 #2
0
파일: Grid.php 프로젝트: Umz/ImpressPages
 /**
  * Create field object for grid
  * @param array $config config of this particular field
  * @param $wholeConfig whole grid setup config
  * @throws \Ip\Exception
  */
 public function __construct($fieldConfig, $wholeConfig)
 {
     $this->parentField = 'id';
     if (empty($fieldConfig['gridId'])) {
         throw new \Ip\Exception('Grid field needs \'gridId\' - a unique identificator of a subgrid.');
     }
     $this->gridId = $fieldConfig['gridId'];
     if (empty($fieldConfig['config'])) {
         throw new \Ip\Exception('Grid field needs \'config\' setting to be set.');
     }
     $this->config = $fieldConfig['config'];
     return parent::__construct($fieldConfig, $wholeConfig);
 }
예제 #3
0
 /**
  * Create field object for grid
  * @param array $fieldFieldConfig config of this particular field
  * @param $wholeConfig whole grid setup config
  * @throws \Ip\Exception
  */
 public function __construct($fieldFieldConfig, $wholeConfig)
 {
     if (!empty($fieldFieldConfig['currency'])) {
         $this->currency = $fieldFieldConfig['currency'];
     } else {
         $this->currency = 'USD';
     }
     if (!empty($fieldFieldConfig['currencyField'])) {
         $this->currencyField = $fieldFieldConfig['currencyField'];
     }
     if (!empty($fieldFieldConfig['defaultValue'])) {
         $fieldFieldConfig['defaultValue'] = $fieldFieldConfig['defaultValue'] / 100;
     }
     return parent::__construct($fieldFieldConfig, $wholeConfig);
 }
예제 #4
0
 public function __construct($fieldFieldConfig, $wholeConfig)
 {
     parent::__construct($fieldFieldConfig, $wholeConfig);
     if (!empty($fieldFieldConfig['repositoryBindKey'])) {
         $this->repositoryBindKey = $fieldFieldConfig['repositoryBindKey'];
     } else {
         $this->repositoryBindKey = 'Table_' . $wholeConfig['table'] . '_' . $this->field;
     }
     if (array_key_exists('fileLimit', $fieldFieldConfig)) {
         $this->fileLimit = $fieldFieldConfig['fileLimit'];
     } else {
         $this->fileLimit = 1;
     }
     if (!empty($this->defaultValue) && !is_array($this->defaultValue)) {
         $this->defaultValue = array($this->defaultValue);
     }
 }