/** * @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('peer_method', $this->getOption('peer_method')); /* $classMap = $this->getOption('model').'TableMap'; $map = new $classMap(); var_dump(get_class($map->getRelation($this->getOption('depends')))); */ 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('table_method', $this->getOption('table_method')); /* if ($this->getOption('depends')) { $table = Doctrine_Core::getTable($this->getOption('model')); $rel = $table->getRelation($this->getOption('depends')); var_dump($rel->getForeign()); } */ return parent::render($name, $value, $attributes, $errors); }