Backend\Modules\Profiles\Actions\Edit::loadGroups PHP Метод

loadGroups() приватный Метод

Load the data grid with groups.
private loadGroups ( )
    private function loadGroups()
    {
        // create the data grid
        $this->dgGroups = new BackendDataGridDB(BackendProfilesModel::QRY_DATAGRID_BROWSE_PROFILE_GROUPS, array($this->profile['id']));
        // sorting columns
        $this->dgGroups->setSortingColumns(array('group_name'), 'group_name');
        // disable paging
        $this->dgGroups->setPaging(false);
        // set column function
        $this->dgGroups->setColumnFunction(array(new BackendDataGridFunctions(), 'getLongDate'), array('[expires_on]'), 'expires_on', true);
        // check if this action is allowed
        if (BackendAuthentication::isAllowedAction('EditProfileGroup')) {
            // set column URLs
            $this->dgGroups->setColumnURL('group_name', BackendModel::createURLForAction('EditProfileGroup') . '&id=[id]&profile_id=' . $this->id);
            // edit column
            $this->dgGroups->addColumn('edit', null, BL::getLabel('Edit'), BackendModel::createURLForAction('EditProfileGroup') . '&id=[id]&profile_id=' . $this->id, BL::getLabel('Edit'));
        }
    }