本文整理汇总了PHP中eZWorkflow::fetchList方法的典型用法代码示例。如果您正苦于以下问题:PHP eZWorkflow::fetchList方法的具体用法?PHP eZWorkflow::fetchList怎么用?PHP eZWorkflow::fetchList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZWorkflow
的用法示例。
在下文中一共展示了eZWorkflow::fetchList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeSelectedGroups
function removeSelectedGroups($http, &$groups, $base)
{
if ($http->hasPostVariable("DeleteGroupButton")) {
if (eZHTTPPersistence::splitSelected($base, $groups, $http, "id", $keepers, $rejects)) {
$groups = $keepers;
foreach ($rejects as $reject) {
$group_id = $reject->attribute("id");
// Remove all workflows in current group
$list_in_group = eZWorkflowGroupLink::fetchWorkflowList(0, $group_id, $asObject = true);
$workflow_list = eZWorkflow::fetchList();
$list = array();
foreach ($workflow_list as $workflow) {
foreach ($list_in_group as $group) {
$id = $workflow->attribute("id");
$workflow_id = $group->attribute("workflow_id");
if ($id === $workflow_id) {
$list[] = $workflow;
}
}
}
foreach ($list as $workFlow) {
eZTrigger::removeTriggerForWorkflow($workFlow->attribute('id'));
$workFlow->remove();
}
$reject->remove();
eZWorkflowGroupLink::removeGroupMembers($group_id);
}
}
}
}
示例2: getReport
public function getReport()
{
// quick and dirty: use same data as for the web
$tpl = sysInfoTools::eZTemplateFactory();
$tpl->setVariable('title', 'Workflows Report');
$workflows = eZWorkflow::fetchList();
$triggers = eZTrigger::fetchList();
$tpl->setVariable('workflows', $workflows);
$tpl->setVariable('triggers', $triggers);
$htmlReport = $tpl->fetch("design:sysinfo/workflowsreport.tpl");
return $htmlReport;
}
示例3: array
$workflowList[$workflow->attribute( 'id' )] = $workflow;
}
*/
$user = eZUser::currentUser();
$list_in_group = eZWorkflowGroupLink::fetchWorkflowList(0, $WorkflowGroupID, $asObject = true);
$workflow_list = eZWorkflow::fetchList();
$list = array();
foreach ($workflow_list as $workflow) {
foreach ($list_in_group as $inGroup) {
if ($workflow->attribute('id') === $inGroup->attribute('workflow_id')) {
$list[] = $workflow;
}
}
}
$templist_in_group = eZWorkflowGroupLink::fetchWorkflowList(1, $WorkflowGroupID, $asObject = true);
$tempworkflow_list = eZWorkflow::fetchList(1);
$temp_list = array();
foreach ($tempworkflow_list as $tmpWorkflow) {
foreach ($templist_in_group as $tmpInGroup) {
if ($tmpWorkflow->attribute('id') === $tmpInGroup->attribute('workflow_id')) {
$temp_list[] = $tmpWorkflow;
}
}
}
$Module->setTitle(ezpI18n::tr('kernel/workflow', 'Workflow list of group') . ' ' . $WorkflowGroupID);
$WorkflowgroupInfo = eZWorkflowGroup::fetch($WorkflowGroupID);
if (!$WorkflowgroupInfo) {
return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
$tpl = eZTemplate::factory();
$tpl->setVariable("temp_workflow_list", $temp_list);
示例4: array
* @package kernel
*/
$Module = $Params['Module'];
// $execStack = eZExecutionStack::instance();
// $execStack->clear();
// $execStack->addEntry( $Module->functionURI( 'list' ),
// $Module->attribute( 'name' ), 'list' );
$http = eZHTTPTool::instance();
if ($http->hasPostVariable('NewGroupButton')) {
return $Module->run('groupedit', array());
}
if ($http->hasPostVariable('NewWorkflowButton')) {
return $Module->run('edit', array());
}
if ($http->hasPostVariable('DeleteButton') and $http->hasPostVariable('Workflow_id_checked')) {
eZWorkflow::setIsEnabled(false, $http->postVariable('Workflow_id_checked'));
}
$groupList = eZWorkflowGroup::fetchList();
$workflows = eZWorkflow::fetchList();
$workflowList = array();
foreach ($workflows as $workflow) {
$workflowList[$workflow->attribute('id')] = $workflow;
}
$Module->setTitle('Workflow list');
$tpl = eZTemplate::factory();
$tpl->setVariable('workflow_list', $workflowList);
$tpl->setVariable('group_list', $groupList);
$tpl->setVariable('module', $Module);
$Result = array();
$Result['content'] = $tpl->fetch('design:workflow/list.tpl');
$Result['path'] = array(array('url' => '/workflow/list/', 'text' => ezpI18n::tr('kernel/workflow', 'Workflow list')));
示例5: 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);
}
示例6: attribute
function attribute($attr)
{
switch ($attr) {
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;
}
return eZWorkflowEventType::attribute($attr);
}