/** * @param string $name The element name * @param string $value The date displayed in this widget * @param array $attributes An array of HTML attributes to be merged with the default HTML attributes * @param array $errors An array of errors for the field * * @return string An HTML tag string * * @see sfWidgetForm */ public function render($name, $value = null, $attributes = array(), $errors = array()) { if (!$this->getOption('ref_method') && $this->getOption('depends')) { if ($this->isModel($this->getOption('depends'))) { $this->setOption('ref_method', 'get' . $this->getOption('depends') . 'Id'); } else { $this->setOption('ref_method', 'get' . ucfirst($this->getOption('depends'))); } } $this->setSourceParam(array('model' => $this->getOption('model'), 'method' => $this->getOption('method'), 'value_method' => $this->getOption('key_method'), 'ref_method' => $this->getOption('ref_method'), 'order_by' => $this->getOption('order_by'))); return parent::render($name, $value, $attributes, $errors); }
/** * @param string $name The element name * @param string $value The date displayed in this widget * @param array $attributes An array of HTML attributes to be merged with the default HTML attributes * @param array $errors An array of errors for the field * * @return string An HTML tag string * * @see sfWidgetForm */ public function render($name, $value = null, $attributes = array(), $errors = array()) { $this->setSourceParam('callable', $this->getOption('callable')); return parent::render($name, $value, $attributes, $errors); }