当前位置: 首页>>代码示例>>PHP>>正文


PHP Criteria::addAscendingOrderByColumn方法代码示例

本文整理汇总了PHP中Criteria::addAscendingOrderByColumn方法的典型用法代码示例。如果您正苦于以下问题:PHP Criteria::addAscendingOrderByColumn方法的具体用法?PHP Criteria::addAscendingOrderByColumn怎么用?PHP Criteria::addAscendingOrderByColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Criteria的用法示例。


在下文中一共展示了Criteria::addAscendingOrderByColumn方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 public function execute($request)
 {
     if (!isset($request->limit)) {
         $request->limit = sfConfig::get('app_hits_per_page');
     }
     $criteria = new Criteria();
     switch ($request->sort) {
         case 'nameDown':
             $criteria->addDescendingOrderByColumn('authorized_form_of_name');
             break;
         case 'nameUp':
             $criteria->addAscendingOrderByColumn('authorized_form_of_name');
             break;
         case 'updatedDown':
             $criteria->addDescendingOrderByColumn(QubitObject::UPDATED_AT);
             break;
         case 'updatedUp':
             $criteria->addAscendingOrderByColumn(QubitObject::UPDATED_AT);
             break;
         default:
             if (!$this->getUser()->isAuthenticated()) {
                 $criteria->addAscendingOrderByColumn('authorized_form_of_name');
             } else {
                 $criteria->addDescendingOrderByColumn(QubitObject::UPDATED_AT);
             }
     }
     // Do source culture fallback
     $criteria = QubitCultureFallback::addFallbackCriteria($criteria, 'QubitFunction');
     // Page results
     $this->pager = new QubitPager('QubitFunction');
     $this->pager->setCriteria($criteria);
     $this->pager->setMaxPerPage($request->limit);
     $this->pager->setPage($request->page);
 }
开发者ID:nurfiantara,项目名称:ehri-ica-atom,代码行数:34,代码来源:browseAction.class.php

示例2: execute

 public function execute($request)
 {
     if (!$this->context->user->hasCredential(array('contributor', 'editor', 'administrator'), false)) {
         QubitAcl::forwardUnauthorized();
     }
     if (!isset($request->limit)) {
         $request->limit = sfConfig::get('app_hits_per_page');
     }
     $criteria = new Criteria();
     switch ($request->sort) {
         case 'nameDown':
             $criteria->addDescendingOrderByColumn('identifier');
             break;
         case 'nameUp':
             $criteria->addAscendingOrderByColumn('identifier');
             break;
         case 'updatedDown':
             $criteria->addDescendingOrderByColumn(QubitObject::UPDATED_AT);
             break;
         case 'updatedUp':
             $criteria->addAscendingOrderByColumn(QubitObject::UPDATED_AT);
             break;
         default:
             if (!$this->getUser()->isAuthenticated()) {
                 $criteria->addAscendingOrderByColumn('authorized_form_of_name');
             } else {
                 $criteria->addDescendingOrderByColumn(QubitObject::UPDATED_AT);
             }
     }
     // Page results
     $this->pager = new QubitPager('QubitAccession');
     $this->pager->setCriteria($criteria);
     $this->pager->setMaxPerPage($request->limit);
     $this->pager->setPage($request->page);
 }
开发者ID:nurfiantara,项目名称:ehri-ica-atom,代码行数:35,代码来源:browseAction.class.php

示例3: getOrderedStudentExaminationRepprovedSubjects

 public function getOrderedStudentExaminationRepprovedSubjects()
 {
     $c = new Criteria();
     $c->addAscendingOrderByColumn(StudentExaminationRepprovedSubjectPeer::MARK);
     $c->addAscendingOrderByColumn(StudentExaminationRepprovedSubjectPeer::DATE);
     return $this->getStudentExaminationRepprovedSubjects($c);
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:7,代码来源:StudentRepprovedCourseSubject.php

示例4: execute

 public function execute($request)
 {
     $this->resource = $request->getAttribute('sf_route')->resource;
     $criteria = new Criteria();
     $criteria->add(QubitEvent::ACTOR_ID, $this->resource->id);
     $criteria->addJoin(QubitEvent::INFORMATION_OBJECT_ID, QubitInformationObject::ID);
     $criteria->addAscendingOrderByColumn(QubitEvent::TYPE_ID);
     // Sort info objects alphabetically (w/ fallback)
     $criteria->addAscendingOrderByColumn('title');
     $criteria = QubitCultureFallback::addFallbackCriteria($criteria, 'QubitInformationObject');
     // Filter draft descriptions
     $criteria = QubitAcl::addFilterDraftsCriteria($criteria);
     $this->relatedInfoObjects = array();
     foreach (QubitEvent::get($criteria) as $item) {
         $this->relatedInfoObjects[$item->type->getRole()][] = $item->informationObject;
     }
     // Get "subject of" information objects (name access point)
     $criteria = new Criteria();
     $criteria->add(QubitRelation::OBJECT_ID, $this->resource->id);
     $criteria->add(QubitRelation::TYPE_ID, QubitTerm::NAME_ACCESS_POINT_ID);
     $this->subjectInfoObjects = array();
     foreach (QubitRelation::get($criteria) as $item) {
         $this->subjectInfoObjects[] = $item->subject;
     }
 }
开发者ID:nurfiantara,项目名称:ehri-ica-atom,代码行数:25,代码来源:contextMenuComponent.class.php

示例5: execute

 public function execute($request)
 {
     parent::execute($request);
     $this->permissions = array();
     if (null != $this->resource->id) {
         // Get term permissions for this group
         $criteria = new Criteria();
         $criteria->addJoin(QubitAclPermission::OBJECT_ID, QubitObject::ID, Criteria::LEFT_JOIN);
         $criteria->add(QubitAclPermission::GROUP_ID, $this->resource->id);
         $c1 = $criteria->getNewCriterion(QubitAclPermission::OBJECT_ID, null, Criteria::ISNULL);
         $c2 = $criteria->getNewCriterion(QubitObject::CLASS_NAME, 'QubitTerm');
         $c1->addOr($c2);
         $criteria->add($c1);
         $criteria->addAscendingOrderByColumn(QubitAclPermission::CONSTANTS);
         $criteria->addAscendingOrderByColumn(QubitAclPermission::OBJECT_ID);
         if (0 < count($permissions = QubitAclPermission::get($criteria))) {
             $this->permissions = $permissions;
         }
     }
     // List of actions without create or translate
     $this->basicActions = QubitAcl::$ACTIONS;
     unset($this->basicActions['read']);
     unset($this->basicActions['translate']);
     if ($request->isMethod('post')) {
         $this->form->bind($request->getPostParameters());
         if ($this->form->isValid()) {
             $this->processForm();
             $this->redirect(array($this->resource, 'module' => 'aclGroup', 'action' => 'indexTermAcl'));
         }
     }
 }
开发者ID:nurfiantara,项目名称:ehri-ica-atom,代码行数:31,代码来源:editTermAclAction.class.php

示例6: doSelectOrdered

 public static function doSelectOrdered()
 {
     $criteria = new Criteria();
     $criteria->addAscendingOrderByColumn(EmployeePeer::EMP_NO);
     $criteria->addAscendingOrderByColumn(EmployeePeer::NAME);
     return EmployeePeer::doSelect($criteria);
 }
开发者ID:taryono,项目名称:school,代码行数:7,代码来源:EmployeePeer.php

示例7: execute

 public function execute($request)
 {
     if (!isset($request->limit)) {
         $request->limit = sfConfig::get('app_hits_per_page');
     }
     $criteria = new Criteria();
     if (isset($this->getRoute()->resource)) {
         $this->resource = $this->getRoute()->resource;
         $criteria->add(QubitInformationObject::PARENT_ID, $this->resource->id);
     } else {
         $criteria->add(QubitInformationObject::PARENT_ID, QubitInformationObject::ROOT_ID);
     }
     if (isset($request->repositoryId)) {
         $criteria->add(QubitInformationObject::REPOSITORY_ID, $request->repositoryId);
     }
     if (isset($request->collectionType)) {
         $criteria->add(QubitInformationObject::COLLECTION_TYPE_ID, $request->collectionType);
     }
     $fallbackTable = 'QubitInformationObject';
     switch ($request->sort) {
         case 'repositoryDown':
             $fallbackTable = 'QubitActor';
             $criteria->addJoin(QubitInformationObject::REPOSITORY_ID, QubitActor::ID, Criteria::LEFT_JOIN);
             $criteria->addDescendingOrderByColumn('authorized_form_of_name');
             break;
         case 'repositoryUp':
             $fallbackTable = 'QubitActor';
             $criteria->addJoin(QubitInformationObject::REPOSITORY_ID, QubitActor::ID, Criteria::LEFT_JOIN);
             $criteria->addAscendingOrderByColumn('authorized_form_of_name');
             break;
         case 'titleDown':
             $criteria->addDescendingOrderByColumn('title');
             break;
         case 'titleUp':
             $criteria->addAscendingOrderByColumn('title');
             break;
         case 'updatedDown':
             $criteria->addDescendingOrderByColumn(QubitObject::UPDATED_AT);
             break;
         case 'updatedUp':
             $criteria->addAscendingOrderByColumn(QubitObject::UPDATED_AT);
             break;
         default:
             if (!$this->getUser()->isAuthenticated()) {
                 $criteria->addAscendingOrderByColumn('title');
             } else {
                 $criteria->addDescendingOrderByColumn(QubitObject::UPDATED_AT);
             }
     }
     // Do source culture fallback
     $criteria = QubitCultureFallback::addFallbackCriteria($criteria, $fallbackTable);
     // Filter drafts
     $criteria = QubitAcl::addFilterDraftsCriteria($criteria);
     // Page results
     $this->pager = new QubitPager('QubitInformationObject');
     $this->pager->setCriteria($criteria);
     $this->pager->setMaxPerPage($request->limit);
     $this->pager->setPage($request->page);
 }
开发者ID:nurfiantara,项目名称:ehri-ica-atom,代码行数:59,代码来源:browseAction.class.php

示例8: getAllOrderedByCategory

 public static function getAllOrderedByCategory()
 {
     $c = new Criteria();
     $c->addJoin(self::CATEGORY_ID, sfSimpleForumCategoryPeer::ID);
     $c->addAscendingOrderByColumn(sfSimpleForumCategoryPeer::RANK);
     $c->addAscendingOrderByColumn(self::RANK);
     return self::doSelectJoinCategoryLeftJoinPost($c);
 }
开发者ID:kriswallsmith,项目名称:sfSimpleForumPlugin,代码行数:8,代码来源:PluginsfSimpleForumForumPeer.php

示例9: getMatriculats

 public function getMatriculats()
 {
     $C = new Criteria();
     $C->addAscendingOrderByColumn(MatriculesPeer::ESTAT);
     $C->addAscendingOrderByColumn(MatriculesPeer::DATAINSCRIPCIO);
     //$C->add(MatriculesPeer::CURSOS_IDCURSOS, $this->getIdcursos());
     return $this->getMatriculess($C);
 }
开发者ID:nagiro,项目名称:hospici_cultural,代码行数:8,代码来源:Cursos.php

示例10: executeList

 public function executeList()
 {
     $c = new Criteria();
     $c->addAscendingOrderByColumn(PodcastPeer::TITLE);
     $c->addAscendingOrderByColumn(PodcastPeer::UPDATED_AT);
     $c->addAscendingOrderByColumn(PodcastPeer::CREATED_AT);
     $this->podcasts = PodcastPeer::doSelect($c);
 }
开发者ID:WIZARDISHUNGRY,项目名称:sflimetracker,代码行数:8,代码来源:actions.class.php

示例11: doSelectJoinAnioByOrden

 public static function doSelectJoinAnioByOrden(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     //      $c->addAscendingOrderByColumn(AnioPeer::ORDEN);
     $c->addAscendingOrderByColumn(AnioPeer::DESCRIPCION);
     $c->addAscendingOrderByColumn(DivisionPeer::ORDEN);
     $c->addAscendingOrderByColumn(DivisionPeer::DESCRIPCION);
     return DivisionPeer::doSelectJoinAnio($c);
 }
开发者ID:mediasadc,项目名称:alba,代码行数:8,代码来源:DivisionPeer.php

示例12: execute

 public function execute($request)
 {
     $this->resource = $this->getRoute()->resource;
     // Except for administrators, only allow users to see their own profile
     if (!$this->context->user->hasCredential('administrator')) {
         if ($this->resource->id != $this->context->user->getAttribute('user_id')) {
             $this->redirect('admin/secure');
         }
     }
     // Get user's groups
     $this->userGroups = array();
     if (0 < count($aclUserGroups = $this->resource->aclUserGroups)) {
         foreach ($aclUserGroups as $aclUserGroup) {
             $this->userGroups[] = $aclUserGroup->groupId;
         }
     } else {
         // User is *always* part of authenticated group
         $this->userGroups = array(QubitAclGroup::AUTHENTICATED_ID);
     }
     // Table width
     $this->tableCols = count($this->userGroups) + 3;
     // Get access control permissions
     $criteria = new Criteria();
     $criteria->addJoin(QubitAclPermission::OBJECT_ID, QubitObject::ID, Criteria::LEFT_JOIN);
     $c1 = $criteria->getNewCriterion(QubitAclPermission::USER_ID, $this->resource->id);
     // Add group criteria
     if (1 == count($this->userGroups)) {
         $c2 = $criteria->getNewCriterion(QubitAclPermission::GROUP_ID, $this->userGroups[0]);
     } else {
         $c2 = $criteria->getNewCriterion(QubitAclPermission::GROUP_ID, $this->userGroups, Criteria::IN);
     }
     $c1->addOr($c2);
     // Add info object criteria
     $c3 = $criteria->getNewCriterion(QubitObject::CLASS_NAME, 'QubitInformationObject');
     $c4 = $criteria->getNewCriterion(QubitAclPermission::OBJECT_ID, null, Criteria::ISNULL);
     $c3->addOr($c4);
     $c1->addAnd($c3);
     $criteria->add($c1);
     // Sort
     $criteria->addAscendingOrderByColumn(QubitAclPermission::CONSTANTS);
     $criteria->addAscendingOrderByColumn(QubitAclPermission::OBJECT_ID);
     $criteria->addAscendingOrderByColumn(QubitAclPermission::USER_ID);
     $criteria->addAscendingOrderByColumn(QubitAclPermission::GROUP_ID);
     // Add user as final "group"
     $this->userGroups[] = $this->resource->username;
     // Build ACL
     $this->acl = array();
     if (0 < count($permissions = QubitAclPermission::get($criteria))) {
         foreach ($permissions as $item) {
             // In this context permissions for all objects (null) and root actor
             // object are equivalent
             $objectId = QubitInformationObject::ROOT_ID != $item->objectId ? $item->objectId : null;
             // Use username as "group" for permissions specific to user
             $groupKey = null !== $item->groupId ? $item->groupId : $this->resource->username;
             $this->acl[$item->getConstants(array('name' => 'repositoryId'))][$objectId][$item->action][$groupKey] = $item;
         }
     }
 }
开发者ID:nurfiantara,项目名称:ehri-ica-atom,代码行数:58,代码来源:indexInformationObjectAclAction.class.php

示例13: executeList

 public function executeList()
 {
     $c = new Criteria();
     //$c->add(DesignationPeer::TITLE, 'None', Criteria::NOT_EQUAL);
     $c->add(DesignationPeer::STATUS, Constant::RECORD_STATUS_DELETED, Criteria::NOT_EQUAL);
     $c->addAscendingOrderByColumn(DesignationPeer::DEPARTMENT_ID);
     $c->addAscendingOrderByColumn(DesignationPeer::TITLE);
     $this->designations = DesignationPeer::doSelect($c);
 }
开发者ID:lejacome,项目名称:hospital-mgt,代码行数:9,代码来源:actions.class.php

示例14: retrieveSorted

 public static function retrieveSorted(Criteria $criteria = null, PropelPDO $con = null)
 {
     if (null === $criteria) {
         $criteria = new Criteria();
     }
     $criteria->addAscendingOrderByColumn(self::LAST_NAME);
     $criteria->addAscendingOrderByColumn(self::FIRST_NAME);
     return self::doSelect($criteria, $con);
 }
开发者ID:ncuesta,项目名称:gradebook,代码行数:9,代码来源:StudentPeer.php

示例15: executeList

 public function executeList()
 {
     $c = new Criteria();
     //$c->add(WardBedPeer::TITLE, 'None', Criteria::NOT_EQUAL);
     $c->add(WardBedPeer::STATUS, Constant::BED_DELETE, Criteria::NOT_EQUAL);
     $c->addAscendingOrderByColumn(WardBedPeer::WARD_ID);
     $c->addAscendingOrderByColumn(WardBedPeer::BED);
     $this->beds = WardBedPeer::doSelect($c);
 }
开发者ID:lejacome,项目名称:hospital-mgt,代码行数:9,代码来源:actions.class.php


注:本文中的Criteria::addAscendingOrderByColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。