public function configure() { $this->setWidget('resources', new sfWidgetFormSelectDoubleList(array('choices' => ResourcesPeer::getChoices(), 'label_unassociated' => 'No seleccionados', 'label_associated' => 'Seleccionados', 'associate' => '<img src="../../../sfFormExtraPlugin/images/next.png" alt="Seleccionar" />', 'unassociate' => '<img src="../../../sfFormExtraPlugin/images/previous.png" alt="Desseleccionar" />'))); $this->setValidator('resources', new sfValidatorPropelChoiceMany(array('model' => 'Resources', 'required' => false))); $this->validatorSchema->getPostValidator()->setMessage('invalid', 'Ya existe un aula con éste nombre.'); }
public function getResources() { return ResourcesPeer::getallByClassRoom($this->getId()); }