예제 #1
0
 /**
  * Constructor
  *
  * @param null|string|int $name   Optional name for the element
  * @param string          $markup Page type: text, html, markdown
  */
 public function __construct($name = null, $markup = null)
 {
     $name = $name ?: 'comment-post';
     $this->markup = $markup ?: $this->markup;
     parent::__construct($name);
     $this->setAttribute('action', Pi::service('comment')->getUrl('submit'));
 }
예제 #2
0
 /**
  * Constructor
  *
  * @param string $name
  * @param array $config
  */
 public function __construct($name, array $config = array())
 {
     if (!$config) {
         $config = Pi::user()->config();
     }
     $this->config = $config;
     parent::__construct($name);
 }
예제 #3
0
 public function __construct($name = null, $option = array())
 {
     $this->option = $option;
     $this->thumbUrl = isset($option['thumbUrl']) ? $option['thumbUrl'] : '';
     $this->removeUrl = isset($option['removeUrl']) ? $option['removeUrl'] : '';
     $this->module = Pi::service('module')->current();
     parent::__construct($name);
 }
예제 #4
0
 /**
  * Initialize object
  * 
  * @param string  $name     Form name
  * @param array   $options  Optional parameters
  */
 public function __construct($name, $options = array())
 {
     if (isset($options['mode'])) {
         $this->mode = $options['mode'];
     }
     if (Config::FORM_MODE_CUSTOM == $this->mode) {
         $this->items = isset($options['elements']) ? $options['elements'] : array();
     } elseif (!empty($options['elements'])) {
         $this->items = $options['elements'];
     } else {
         $this->items = $this->getDefaultElements($this->mode);
     }
     parent::__construct($name);
 }
예제 #5
0
 /**
  * {@inheritDoc}
  *
  * @param array|string $fields
  */
 public function __construct($name, $fields = array())
 {
     if (!$fields || !is_array($fields)) {
         if ($fields && is_string($fields)) {
             $configFile = $fields;
         } else {
             $configFile = $this->configIdentifier;
         }
         if ($configFile) {
             $fields = Pi::api('form', 'user')->loadFields($configFile);
         }
     }
     $this->fields = $fields;
     parent::__construct($name);
 }
예제 #6
0
 /**
  * Constructor
  *
  * @param null|string|int $name Optional name for the element
  * @param string $markup Page type: text, html, markdown
  */
 public function __construct($name = null, $markup = null)
 {
     $this->markup = $markup ?: $this->markup;
     parent::__construct($name);
 }
예제 #7
0
 /**
  * Constructor
  *
  * @param null|string|int $name Optional name for the form
  * @param array $user User account data
  */
 public function __construct($name = null, $user = array())
 {
     $this->user = array_merge($this->user, $user);
     parent::__construct($name);
 }
예제 #8
0
 public function __construct($name = null)
 {
     parent::__construct($name);
 }
예제 #9
0
 public function __construct($name, $fields)
 {
     $this->fields = $fields;
     $this->name = $name;
     parent::__construct($this->name);
 }
예제 #10
0
 /**
  * Constructor
  *
  * @param array $configs
  * @param string $module
  */
 public function __construct($configs, $module)
 {
     $this->module = $module;
     $this->configs = $configs;
     parent::__construct($this->name);
 }
예제 #11
0
 /**
  * Constructor
  *
  * @param null|string|int $name Optional name for the element
  * @param Account $user User account row
  */
 public function __construct($name = null, $user = null)
 {
     $this->user = $user;
     parent::__construct($name);
 }
예제 #12
0
 public function __construct($name = null, $option = array())
 {
     $this->option = $option;
     parent::__construct($name);
 }
예제 #13
0
 /**
  * Constructor
  *
  * @param null|string|int $name Optional name for the element
  * @param BlockRow $root Root block to be cloned
  */
 public function __construct($name = null, $root = null)
 {
     $this->root = $root;
     parent::__construct($name);
 }
예제 #14
0
 /**
  * Constructor
  *
  * @param null|string|int $name Optional name for the form
  * @param string $section
  */
 public function __construct($name = null, $section = 'front')
 {
     $this->section = $section;
     parent::__construct($name);
 }
예제 #15
0
 /**
  * Constructor
  *
  * @param string|int $name Optional name for the element
  * @param string            $type
  */
 public function __construct($name = null, $type = null)
 {
     $this->type = $type;
     parent::__construct($name);
 }
예제 #16
0
 public function __construct($name = null, $option = array())
 {
     $this->option = $option;
     $this->module = Pi::service('module')->current();
     parent::__construct($name);
 }
예제 #17
0
 /**
  * Constructor
  *
  * @param null|string|int $name Optional name for the form
  * @param string $module Page module
  */
 public function __construct($name = null, $module = null)
 {
     $this->module = $module;
     parent::__construct($name);
 }
예제 #18
0
 public function __construct($name = null, $option = array())
 {
     parent::__construct($name);
 }
예제 #19
0
 public function __construct($name, $options = array())
 {
     $this->items = isset($options['elements']) ? $options['elements'] : array();
     $this->custom = isset($options['custom']) ? $options['custom'] : array();
     parent::__construct($name);
 }