/** * Tests for success at creating the object. */ public function testCreate() { $t = sfGuardPermissionTable::getInstance(); $this->assertTrue($t instanceof Doctrine_Table); }
public static function setCurrentProfile($profile) { $p = sfGuardPermissionTable::getInstance()->findOneById($profile); if ($p) { sfContext::getInstance()->getUser()->setAttribute('current_permission', $p->getId()); } }
public function executePermissionsMatrix(sfWebRequest $request) { $data = array(); $data['permissions'] = sfGuardPermissionTable::getInstance()->createQuery('p')->where('p.enable_advanced = ?', 1)->orderBy('p.description ASC')->execute(); return $this->renderPartial('permissions_matrix', $data); }