本文整理汇总了PHP中MUtil_Model_ModelAbstract::getOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP MUtil_Model_ModelAbstract::getOrder方法的具体用法?PHP MUtil_Model_ModelAbstract::getOrder怎么用?PHP MUtil_Model_ModelAbstract::getOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MUtil_Model_ModelAbstract
的用法示例。
在下文中一共展示了MUtil_Model_ModelAbstract::getOrder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createModel
/**
* Creates the model
*
* @return \MUtil_Model_ModelAbstract
*/
protected function createModel()
{
// Replace two checkboxes with on radio button control
$this->model->set('ggp_staff_members', 'elementClass', 'Hidden');
$this->model->setOnSave('ggp_staff_members', array($this, 'saveIsStaff'));
$this->model->set('ggp_respondent_members', 'elementClass', 'Hidden');
$this->model->setOnSave('ggp_respondent_members', array($this, 'saveIsRespondent'));
$options = array('1' => $this->model->get('ggp_staff_members', 'label'), '2' => $this->model->get('ggp_respondent_members', 'label'));
$this->model->set('staff_respondent', 'label', $this->_('Can be assigned to'), 'elementClass', 'Radio', 'multiOptions', $options, 'order', $this->model->getOrder('ggp_staff_members') + 1);
$this->model->setOnLoad('staff_respondent', array($this, 'loadStaffRespondent'));
return $this->model;
}
示例2: addConfigFields
/**
* Appends the needed fields for this config to the $bridge
*
* @param \MUtil_Model_ModelAbstract $orgModel
*/
public function addConfigFields(\MUtil_Model_ModelAbstract $orgModel)
{
$configModel = $this->getConfigModel(true);
$order = $orgModel->getOrder('gor_user_class') + 1;
foreach ($configModel->getItemNames() as $name) {
$orgModel->set($name, 'order', $order++, 'tab', 'access');
$orgModel->set($name, $configModel->get($name));
}
}
示例3: _sortTranslatorTable
/**
* Helper function to sort translator table by model order
*
* @param string $a
* @param string $b
* @return int
*/
protected function _sortTranslatorTable($a, $b)
{
$ao = $this->targetModel->getOrder($a);
$bo = $this->targetModel->getOrder($b);
if ($ao < $bo) {
return -1;
} elseif ($ao > $bo) {
return 1;
} else {
return 0;
}
}