/**
  *
  * @param \SilverWp\Helper\Control\ControlInterface $control
  * @param                                           $callback_function
  *
  * @return $this
  * @access public
  */
 public function setBinding(ControlInterface $control, $callback_function)
 {
     $this->setting['binding'] = array('field' => $control->getName(), 'function' => $callback_function);
     return $this;
 }
Exemple #2
0
 /**
  *
  * Add control to group
  *
  * @param \SilverWp\Helper\Control\ControlInterface $control
  *
  * @return $this
  * @access public
  */
 public function addControl(ControlInterface $control)
 {
     $this->setting['fields'][] = $control->getSettings();
     return $this;
 }
 /**
  * Add control element to setting form
  *
  * @param \SilverWp\Helper\Control\ControlInterface $control
  *
  * @return $this
  * @access public
  */
 public function addControl(ControlInterface $control)
 {
     $this->settings['params'][] = $control->getSettings();
     $this->controls[] = $control;
     return $this;
 }
 /**
  *
  * Add control to form attribute
  *
  * @param \SilverWp\Helper\Control\ControlInterface $control
  *
  * @return $this
  * @access public
  */
 public function addAttribute(ControlInterface $control)
 {
     $this->settings['attributes'][] = $control->getSettings();
     return $this;
 }