/**
  * Creates a new instance of control holder.
  * 
  * @since 1.0.0
  * @param mixed[] $options A holder options.
  * @param FactoryForms328_Form $form A parent form.
  */
 public function __construct($options, $form)
 {
     parent::__construct($options, $form);
     $this->elements = $form->createElements($options['items']);
     foreach ($this->elements as $val) {
         $val->parent = $this;
     }
 }
예제 #2
0
 public function __construct($options, $form, $provider = null)
 {
     parent::__construct($options, $form, $provider);
     if (!isset($options['color'])) {
         $options['color'] = array();
     }
     $options['color'] = array_merge($options['color'], array('name' => $this->options['name'] . '_color_picker', 'default' => isset($this->options['default']) ? $this->options['default']['color'] : null, 'pickerTarget' => '.factory-control-' . $this->options['name'] . ' .factory-picker-target'));
     if (!$options['color']['default']) {
         $options['color']['default'] = '#1e8cbe';
     }
     $name = $this->getOption('name');
     // filters to get available patterns for the given background contols
     $this->patterns = apply_filters('factory_forms_328_patterns', array());
     $this->patterns = apply_filters('factory_forms_328_patterns-' . $name, $this->patterns);
     $this->customPatterns = $this->getOption('patterns', array());
     $this->color = new FactoryForms328_ColorControl($options['color'], $form, $provider);
 }