/**
  * @param string $name Field name
  * @param string $type Field name
  * @param array $config Field configuration
  */
 public function __construct($name, $type = 'flexible_content', $config = [])
 {
     parent::__construct($name, $type, $config);
     if (!isset($config['button_label'])) {
         $this->setConfig('button_label', $this->getDefaultButtonLabel());
     }
 }
Ejemplo n.º 2
0
 /**
  * @param string $name Field name
  * @param string $type Field name
  * @param array $config Field configuration
  */
 public function __construct($name, $type = 'repeater', $config = [])
 {
     parent::__construct($name, $type, $config);
     $this->fieldsBuilder = new FieldsBuilder($name);
     $this->fieldsBuilder->setParentContext($this);
     if (!array_key_exists('button_label', $config)) {
         $this->setConfig('button_label', $this->getDefaultButtonLabel());
     }
 }