本文整理匯總了PHP中Gdn_Model::FilterForm方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gdn_Model::FilterForm方法的具體用法?PHP Gdn_Model::FilterForm怎麽用?PHP Gdn_Model::FilterForm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gdn_Model
的用法示例。
在下文中一共展示了Gdn_Model::FilterForm方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: FilterForm
public function FilterForm($Data)
{
$Data = parent::FilterForm($Data);
$Data = array_diff_key($Data, array('Admin' => 0, 'Deleted' => 0, 'CountVisits' => 0, 'CountInvitations' => 0, 'CountNotifications' => 0, 'Preferences' => 0, 'Permissions' => 0, 'LastIPAddress' => 0, 'AllIPAddresses' => 0, 'DateFirstVisit' => 0, 'DateLastActive' => 0, 'CountDiscussions' => 0, 'CountComments' => 0, 'Score' => 0));
if (!Gdn::Session()->CheckPermission('Garden.Moderation.Manage')) {
$Data = array_diff_key($Data, array('Banned' => 0, 'Verified' => 0));
}
if (!Gdn::Session()->CheckPermission('Garden.Moderation.Manage')) {
unset($Data['RankID']);
}
if (!Gdn::Session()->CheckPermission('Garden.Users.Edit') && !C("Garden.Profile.EditUsernames")) {
unset($Data['Name']);
}
return $Data;
}
示例2: filterForm
/**
* @param array $data
* @param bool $register
* @return array
*/
public function filterForm($data, $register = false)
{
if (!$register && !Gdn::session()->checkPermission('Garden.Users.Edit') && !c("Garden.Profile.EditUsernames")) {
$this->removeFilterField('Name');
}
if (!Gdn::session()->checkPermission('Garden.Moderation.Manage')) {
$this->addFilterField(array('Banned', 'Verified', 'Confirmed', 'RankID'));
}
$data = parent::FilterForm($data);
return $data;
}
示例3: filterForm
/**
* @param array $data
* @param bool $register
* @return array
*/
public function filterForm($data, $register = false)
{
if (!$register && !Gdn::session()->checkPermission('Garden.Users.Edit') && !c("Garden.Profile.EditUsernames")) {
$this->removeFilterField('Name');
}
$data = parent::FilterForm($data);
return $data;
}