本文整理汇总了PHP中eZWorkflowType::fetchRegisteredTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP eZWorkflowType::fetchRegisteredTypes方法的具体用法?PHP eZWorkflowType::fetchRegisteredTypes怎么用?PHP eZWorkflowType::fetchRegisteredTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZWorkflowType
的用法示例。
在下文中一共展示了eZWorkflowType::fetchRegisteredTypes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: purge
//.........这里部分代码省略.........
eZInformationCollection::removeContentObject( $delID );
eZContentObjectTrashNode::purgeForObject( $delID );
$db->query( "DELETE FROM ezcontentobject_tree
WHERE contentobject_id='$delID'" );
$db->query( "DELETE FROM ezcontentobject_attribute
WHERE contentobject_id='$delID'" );
$db->query( "DELETE FROM ezcontentobject_version
WHERE contentobject_id='$delID'" );
$db->query( "DELETE FROM ezcontentobject_name
WHERE contentobject_id='$delID'" );
$db->query( "DELETE FROM ezcobj_state_link WHERE contentobject_id=$delID" );
$db->query( "DELETE FROM ezcontentobject
WHERE id='$delID'" );
$db->query( "DELETE FROM eznode_assignment
WHERE contentobject_id = '$delID'" );
$db->query( "DELETE FROM ezuser_role
WHERE contentobject_id = '$delID'" );
$db->query( "DELETE FROM ezuser_discountrule
WHERE contentobject_id = '$delID'" );
eZContentObject::fixReverseRelations( $delID, 'remove' );
eZSearch::removeObjectById( $delID );
// Check if deleted object is in basket/wishlist
$sql = 'SELECT DISTINCT ezproductcollection_item.productcollection_id
FROM ezbasket, ezwishlist, ezproductcollection_item
WHERE ( ezproductcollection_item.productcollection_id=ezbasket.productcollection_id OR
ezproductcollection_item.productcollection_id=ezwishlist.productcollection_id ) AND
ezproductcollection_item.contentobject_id=' . $delID;
$rows = $db->arrayQuery( $sql );
if ( count( $rows ) > 0 )
{
$countElements = 50;
$deletedArray = array();
// Create array of productCollectionID will be removed from ezwishlist and ezproductcollection_item
foreach ( $rows as $row )
{
$deletedArray[] = $row['productcollection_id'];
}
// Split $deletedArray into several arrays with $countElements values
$splitted = array_chunk( $deletedArray, $countElements );
// Remove eZProductCollectionItem and eZWishList
foreach ( $splitted as $value )
{
eZPersistentObject::removeObject( eZProductCollectionItem::definition(), array( 'productcollection_id' => array( $value, '' ) ) );
eZPersistentObject::removeObject( eZWishList::definition(), array( 'productcollection_id' => array( $value, '' ) ) );
}
}
$db->query( 'UPDATE ezproductcollection_item
SET contentobject_id = 0
WHERE contentobject_id = ' . $delID );
// Cleanup relations in two steps to avoid locking table for to long
$db->query( "DELETE FROM ezcontentobject_link
WHERE from_contentobject_id = '$delID'" );
$db->query( "DELETE FROM ezcontentobject_link
WHERE to_contentobject_id = '$delID'" );
// Cleanup properties: LastVisit, Creator, Owner
$db->query( "DELETE FROM ezuservisit
WHERE user_id = '$delID'" );
$db->query( "UPDATE ezcontentobject_version
SET creator_id = 0
WHERE creator_id = '$delID'" );
$db->query( "UPDATE ezcontentobject
SET owner_id = 0
WHERE owner_id = '$delID'" );
if ( isset( $GLOBALS["eZWorkflowTypeObjects"] ) and is_array( $GLOBALS["eZWorkflowTypeObjects"] ) )
{
$registeredTypes =& $GLOBALS["eZWorkflowTypeObjects"];
}
else
{
$registeredTypes = eZWorkflowType::fetchRegisteredTypes();
}
// Cleanup ezworkflow_event etc...
foreach ( array_keys( $registeredTypes ) as $registeredTypeKey )
{
$registeredType = $registeredTypes[$registeredTypeKey];
$registeredType->cleanupAfterRemoving( array( 'DeleteContentObject' => $delID ) );
}
$db->commit();
}
示例2: array
eZWorkflowFunctions::addGroup( $WorkflowID, $WorkflowVersion, $selectedGroup );
}
if ( $http->hasPostVariable( "DeleteGroupButton" ) && $http->hasPostVariable( "group_id_checked" ) )
{
$selectedGroup = $http->postVariable( "group_id_checked" );
if ( !eZWorkflowFunctions::removeGroup( $WorkflowID, $WorkflowVersion, $selectedGroup ) )
{
$validation['groups'][] = array( 'text' => ezpI18n::tr( 'kernel/workflow', 'You have to have at least one group that the workflow belongs to!' ) );
$validation['processed'] = true;
}
}
// Fetch events and types
$event_list = $workflow->fetchEvents();
$type_list = eZWorkflowType::fetchRegisteredTypes();
// Validate input
$canStore = true;
$requireFixup = false;
foreach( $event_list as $event )
{
$eventType = $event->eventType();
if ( !$eventType instanceof eZWorkflowEventType )
{
// Can't find eventype. Most likely deactivated while workflow has not been cleant up
eZDebug::writeError( "Couldn't load eventype '{$event->attribute( 'workflow_type_string' )}' for workflow. Is it activated ?", 'eZWorkflow edit' );
continue;
}
$status = $eventType->validateHTTPInput( $http, "WorkflowEvent", $event, $validation );
示例3: array
<?php
/**
* List all existing workflow event types
*
* @author G. Giunta
* @copyright (C) G. Giunta 2014-2016
* @license Licensed under GNU General Public License v2.0. See file license.txt
*
* @todo allow filtering by extension
* @todo add information: originating extension for each type
*/
$eventTypeList = eZWorkflowType::fetchRegisteredTypes();
ksort($eventTypeList);
$workflows = array();
$extensions = eZModuleLister::getModuleList();
// ...
if ($Params['extensionname'] != '' && !array_key_exists($Params['extensionname'], $extensions)) {
/// @todo
} else {
foreach ($eventTypeList as $typeString => $type) {
$workflows[$typeString] = array();
$filter = array('workflow_type_string' => $typeString);
$events = eZWorkflowEvent::fetchFilteredList($filter);
foreach ($events as $event) {
$workflowId = $event->attribute('workflow_id');
if (isset($workflows[$typeString][$workflowId])) {
$workflows[$typeString][$workflowId]['events'][] = $event;
} else {
$workflow = eZWorkflow::fetch($workflowId);
$workflows[$typeString][$workflowId] = array('workflow' => $workflow, 'events' => array($event));