本文整理汇总了PHP中Content::setFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP Content::setFilter方法的具体用法?PHP Content::setFilter怎么用?PHP Content::setFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Content
的用法示例。
在下文中一共展示了Content::setFilter方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doIt
/**
* @access public
* @param aExtrinsicState
* @ParamType aExtrinsicState
*/
public function doIt($tagRoute, $parameters)
{
$menuEntity = $GLOBALS['sys_menu'];
$menuTemplate = new Content($menuEntity, $menuEntity);
$menuTemplate->setFilter("sys_menu_parent_id", $parameters["parent_id"]);
$menuTemplate->setOrderFields("sys_menu_position", 'sys_menu_parent', "sys_menu0_position");
return $menuTemplate->get();
}
示例2: doIt
/**
* @access public
* @param aExtrinsicState
* @ParamType aExtrinsicState
*/
public function doIt($parameters)
{
$servicecategoryEntity = $GLOBALS['sys_servicecategory'];
$servicesEntity = $GLOBALS['sys_service'];
$servicesGroupsRelation = $GLOBALS['sys_service_sys_group'];
$groupsEntity = $GLOBALS['sys_group'];
$usersGroupsRelation = $GLOBALS['sys_user_sys_group'];
$menuTemplate = new Skinlet("menu_admin");
$menu = new Content($servicecategoryEntity, $servicesEntity, $servicesGroupsRelation, $groupsEntity, $usersGroupsRelation);
$menu->setOrderFields("position");
$menu->setFilter("username_sys_user", $_SESSION['user']['username']);
$menu->apply($menuTemplate);
return $menuTemplate->get();
}
示例3: Skin
<?php
session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
$main = new Skin("aqua");
$content = new Content($usersEntity, $facultyRoleEntity, $ssdEntity, $areaEntity);
$content->setFilter("users.active_home = '*'");
$content->setStyle(HIERARCHICAL);
$content->setOrderFields("facultyrole.position", "surname", "name");
$content->setPresentation("facultyrole_name_plural", "users_username", "users_name", "users_surname", "users_email", "area_id", "area_title", "ssd_id", "ssd_name");
$main->setContent("body", $content->get());
$main->close();
?>
示例4: createSystemGraphic
/**
*
* @param Skin $skin
* @param boolean $login
* Costruisce la struttura del back-end.
* Utilizza:
* frame-private-head: tag html <head>
* header e footer: header e footer del tema
*
*/
public function createSystemGraphic($skin, $login = false)
{
/*
* entity necessarie per il funzionamento del back-end
*/
$actualUser = $_SESSION['user']['username'];
$servicecategoryEntity = $GLOBALS['sys_servicecategory'];
$servicesEntity = $GLOBALS['sys_service'];
$servicesGroupsRelation = $GLOBALS['sys_service_sys_group'];
$groupsEntity = $GLOBALS['sys_group'];
$userEntity = $GLOBALS['sys_user'];
$usersGroupsRelation = $GLOBALS['sys_user_sys_group'];
/*
* skinlet frame-private-head: skins/system/frame-private-head.html
*/
$head = new Skinlet("frame-private-head");
/*
* skinlet header: skins/system/header.html
*/
$header = new Skinlet("header");
$loggedUser = new Content($userEntity);
$loggedUser->setFilter('username', $actualUser);
$loggedUser->forceSingle();
$loggedUser->apply($header);
$config = Config::getInstance()->getConfigurations();
$header->setContent('webApp', $config["defaultuser"]["webApp"]);
/*
* skinlet menu_admin: skins/system/menu_admin.html
*/
$menuTemplate = new Skinlet("menu_admin");
$menu = new Content($servicecategoryEntity, $servicesEntity, $servicesGroupsRelation, $groupsEntity, $usersGroupsRelation);
$menu->setOrderFields("position");
$menu->setFilter("username_sys_user", $actualUser);
$menu->apply($menuTemplate);
/*
* skinlet footer: skins/system/footer.html
*/
$footer = new Skinlet("footer");
$menuTemplate->setContent("footer", $footer->get());
/*
* funzionalità breadcrump
*/
/*
$breadcrump = new Skinlet("sitemap");
$breadcrumpContent = new Content($pageEntity, $pageEntity, $pageEntity);
$breadcrumpContent->forceMultiple();
$breadcrumpContent->apply($breadcrump);
$actual_script=str_replace("/", "", $_SERVER['SCRIPT_NAME']);
if($actual_script!="page.php")
$breadcrump->setContent('actual_script', $actual_script);
else
$breadcrump->setContent('actual_script',str_replace("/", "", $_SERVER['REQUEST_URI']) );
$skin->setContent("sitemap", $breadcrump->get());
*/
/*
* creazione della struttura
*/
$skin->setContent("head", $head->get());
$skin->setContent("header", $header->get());
$skin->setContent("menu", $menuTemplate->get());
}
示例5: Skin
<?php
session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$body = new Skinlet("login");
$log = new Content($logEntity);
$log->setFilter("username = '{$_SESSION['user']['username']}' AND operation = 'LOGIN'");
$log->setOrderFields("date DESC");
$log->setLimit(2);
$log->applyIndexed($body);
$_REQUEST['value'] = $_SESSION["user"]["username"];
if (!isset($_REQUEST['page'])) {
$_REQUEST['page'] = 1;
}
$main->setContent("body", $body->get());
$main->close();