本文整理汇总了PHP中eZSection::fetchList方法的典型用法代码示例。如果您正苦于以下问题:PHP eZSection::fetchList方法的具体用法?PHP eZSection::fetchList怎么用?PHP eZSection::fetchList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZSection
的用法示例。
在下文中一共展示了eZSection::fetchList方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: section_list
private function section_list()
{
$sectionObjects = eZSection::fetchList();
$results = array();
$results[] = array("Id", "NavigationPartIdentifier", "Count", "Name");
foreach ($sectionObjects as $section) {
$count = eZSectionFunctionCollection::fetchObjectListCount($section->ID);
$count = $count["result"];
$results[] = array($section->ID, $section->NavigationPartIdentifier, $count, $section->Name);
}
eep::printTable($results, "all sections");
}
示例2: attribute
function attribute($attr)
{
switch ($attr) {
case 'sections':
#include_once( 'kernel/classes/ezsection.php' );
$sections = eZSection::fetchList(false);
foreach (array_keys($sections) as $key) {
$section = $sections[$key];
$section['Name'] = $section['name'];
$section['value'] = $section['id'];
}
return $sections;
break;
}
$eventValue = eZWorkflowEventType::attribute($attr);
return $eventValue;
}
示例3: attribute
function attribute($attr)
{
switch ($attr) {
case 'sections':
$sections = eZSection::fetchList(false);
foreach ($sections as $key => $section) {
$sections[$key]['Name'] = $section['name'];
$sections[$key]['value'] = $section['id'];
}
return $sections;
break;
case 'languages':
return eZContentLanguage::fetchList();
break;
}
return eZWorkflowEventType::attribute($attr);
}
示例4: array
if ($http->hasVariable('SubTreeArray')) {
if (is_array($http->variable('SubTreeArray'))) {
$subTreeList = $http->variable('SubTreeArray');
} else {
$subTreeList = array($http->variable('SubTreeArray'));
}
foreach ($subTreeList as $subTreeItem) {
// as form input is generally a string, is_int cannot be used for checking the value type
if (is_numeric($subTreeItem) && $subTreeItem > 0) {
$subTreeArray[] = $subTreeItem;
}
}
}
$Module->setTitle("Search for: {$searchText}");
$classArray = eZContentClass::fetchList(eZContentClass::VERSION_STATUS_DEFINED, true, false, array('name' => 'asc'));
$sectionArray = eZSection::fetchList();
$searchArray = eZSearch::buildSearchArray();
if ($useSearchCode) {
$searchResult = eZSearch::search($searchText, array('SearchSectionID' => $searchSectionID, 'SearchContentClassID' => $searchContentClassID, 'SearchContentClassAttributeID' => $searchContentClassAttributeID, 'SearchSubTreeArray' => $subTreeArray, 'SearchDate' => $searchDate, 'SearchTimestamp' => $searchTimestamp, 'SearchLimit' => $pageLimit, 'SearchOffset' => $Offset), $searchArray);
if (strlen(trim($searchText)) == 0 && count($searchArray) > 0) {
$searchText = 'search by additional parameter';
}
}
$viewParameters = array('offset' => $Offset);
$searchData = false;
$tpl->setVariable("search_data", $searchData);
$tpl->setVariable('search_contentclass_id', $searchContentClassID);
$tpl->setVariable('search_contentclass_attribute_id', $searchContentClassAttributeID);
$tpl->setVariable('search_section_id', $searchSectionID);
$tpl->setVariable('search_date', $searchDate);
$tpl->setVariable('search_timestamp', $searchTimestamp);
示例5: array
// we changed prices => remove content cache
eZContentCacheManager::clearAllContentCache();
return $module->redirectTo( $module->functionURI( 'discountgroupview' ) . '/' . $discountGroupID );
}
$classList = eZContentClass::fetchList();
$productClassList = array();
foreach ( $classList as $class )
{
if ( eZShopFunctions::isProductClass( $class ) )
$productClassList[] = $class;
}
$sectionList = eZSection::fetchList();
$tpl = eZTemplate::factory();
$tpl->setVariable( 'module', $module );
$tpl->setVariable( 'discountgroup_id', $discountGroupID );
$tpl->setVariable( 'discountrule', $discountRule );
$tpl->setVariable( 'product_class_list', $productClassList );
$tpl->setVariable( 'section_list', $sectionList );
$tpl->setVariable( 'class_limitation_list', $discountRuleSelectedClasses );
$tpl->setVariable( 'section_limitation_list', $discountRuleSelectedSections );
$tpl->setVariable( 'product_list', $productList );
$tpl->setVariable( 'class_any_selected', in_array( -1, $discountRuleSelectedClasses ) );
示例6: fetchSectionList
public static function fetchSectionList()
{
return array('result' => eZSection::fetchList());
}
示例7: allowedAssignSectionList
/**
* @return eZSection[]|null
*/
function allowedAssignSectionList()
{
$currentUser = eZUser::currentUser();
$sectionIDList = $currentUser->canAssignToObjectSectionList( $this );
$sectionList = array();
if ( in_array( '*', $sectionIDList ) )
{
$sectionList = eZSection::fetchList( false );
}
else
{
$sectionIDList[] = $this->attribute( 'section_id' );
$sectionList = eZSection::fetchFilteredList( array( 'id' => array( $sectionIDList ) ), false, false, false );
}
return $sectionList;
}
示例8: fetchSectionList
function fetchSectionList()
{
$sectionObjects = eZSection::fetchList();
return array('result' => $sectionObjects);
}
示例9: attribute
function attribute($attr)
{
switch ($attr) {
case 'sections':
$sections = eZSection::fetchList(false);
foreach ($sections as $key => $section) {
$sections[$key]['Name'] = $section['name'];
$sections[$key]['value'] = $section['id'];
}
return $sections;
break;
case 'languages':
return eZContentLanguage::fetchList();
break;
case 'usergroups':
$groups = eZPersistentObject::fetchObjectList(eZContentObject::definition(), array('id', 'name'), array('contentclass_id' => 3, 'status' => eZContentObject::STATUS_PUBLISHED), null, null, false);
foreach ($groups as $key => $group) {
$groups[$key]['Name'] = $group['name'];
$groups[$key]['value'] = $group['id'];
}
return $groups;
break;
case 'contentclass_list':
$classes = eZContentClass::fetchList(eZContentClass::VERSION_STATUS_DEFINED, true, false, array('name' => 'asc'));
$classList = array();
for ($i = 0; $i < count($classes); $i++) {
$classList[$i]['Name'] = $classes[$i]->attribute('name');
$classList[$i]['value'] = $classes[$i]->attribute('id');
}
return $classList;
break;
case 'workflow_list':
$workflows = eZWorkflow::fetchList();
$workflowList = array();
for ($i = 0; $i < count($workflows); $i++) {
$workflowList[$i]['Name'] = $workflows[$i]->attribute('name');
$workflowList[$i]['value'] = $workflows[$i]->attribute('id');
}
return $workflowList;
break;
}
return eZWorkflowEventType::attribute($attr);
}
示例10: is_object
if ($result === false) {
$setup["database_ok"] = false;
break;
}
}
// Check if content class for newsletter exists
$setup["content_classes_ok"] = is_object(eZContentClass::fetchByIdentifier('jaj_newsletter'));
// Check for newsletter folder
$newsletter_id = $newsletter_ini->variable('NewsletterSettings', 'RootFolderNodeId');
$newsletter_node = eZContentObject::fetchByNodeID($newsletter_id);
$setup["newsletter_folder_ok"] = $newsletter_id && is_object($newsletter_node);
$setup["newsletter_settings_ok"] = $newsletter_ini->variable('NewsletterSettings', 'FromEmail') && $newsletter_ini->variable('NewsletterSettings', 'FromName') && $newsletter_ini->variable('NewsletterSettings', 'ReplyEmail');
// Check for newsletter section
// And check that newsletter node is assigned to section
//$section = eZSection::fetchByIdentifier("jaj_newsletter");
$sections = eZSection::fetchList();
foreach ($sections as $s) {
if ($s->attribute("identifier") == "jaj_newsletter") {
$section = $s;
break;
}
}
if (is_object($newsletter_node) && is_object($section)) {
$setup["newsletter_section_ok"] = $newsletter_node->SectionID == $section->ID;
} else {
$setup["newsletter_section_ok"] = false;
}
// TODO: Add check for access rights for section
$anonymous = eZUser::fetch(eZUser::anonymousId());
//var_dump( $anonymous );
$jaj_subscription_access = $anonymous->hasAccessTo('jaj_newsletter', 'manage_subscription');