public function isValid($value) { $this->_setValue($value); $slug = MAL_Util_TextFormatting::MakeSlug($value); $m_projects = new GD_Model_ProjectsMapper(); $existing_project = $m_projects->getProjectBySlug($slug); if (is_null($existing_project)) { return true; } else { $this->_error(self::ISUNIQUE); return false; } }
public function setName($value) { $this->_name = (string) $value; $this->setSlug(MAL_Util_TextFormatting::MakeSlug($value)); return $this; }