本文整理匯總了PHP中Base_model::publish_filter方法的典型用法代碼示例。如果您正苦於以下問題:PHP Base_model::publish_filter方法的具體用法?PHP Base_model::publish_filter怎麽用?PHP Base_model::publish_filter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Base_model
的用法示例。
在下文中一共展示了Base_model::publish_filter方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unlock_publish_filter
/**
* Switch the publish filter off
*
*/
public function unlock_publish_filter()
{
$uri_string_to_array = explode('/', preg_replace("|^\\/?|", '/', self::$ci->uri->uri_string));
if (!in_array(config_item('admin_url'), $uri_string_to_array)) {
// Settings::get('display_front_offline_content') not available here
$this->{$this->db_group}->where('name', 'display_front_offline_content');
$query = $this->{$this->db_group}->get('setting');
$result = $query->row_array();
if (Authority::can('access', 'admin') && (!empty($result['content']) && $result['content'] == '1')) {
self::$publish_filter = FALSE;
}
} else {
self::$publish_filter = FALSE;
}
}
示例2: unlock_publish_filter
/**
* Switch the publish filter off
*
*/
public function unlock_publish_filter()
{
self::$publish_filter = false;
}