protected function inputOptions($options) { $resources = $options['resources']; $instituicaoId = $this->getInstituicaoId($options['instituicaoId']); $userId = $this->getCurrentUserId(); $isProfessor = Portabilis_Business_Professor::isProfessor($instituicaoId, $userId); if ($instituicaoId and empty($resources) and $isProfessor) { $escolas = Portabilis_Business_Professor::escolasAlocado($instituicaoId, $userId); $resources = Portabilis_Array_Utils::setAsIdValue($escolas, 'id', 'nome'); } elseif ($instituicaoId and empty($resources)) { $resources = App_Model_IedFinder::getEscolas($instituicaoId); } return $this->insertOption(null, "Selecione uma escola", $resources); }