本文整理匯總了PHP中eZUser::fetchUserClassNames方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZUser::fetchUserClassNames方法的具體用法?PHP eZUser::fetchUserClassNames怎麽用?PHP eZUser::fetchUserClassNames使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZUser
的用法示例。
在下文中一共展示了eZUser::fetchUserClassNames方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: customWorkflowEventHTTPAction
function customWorkflowEventHTTPAction( $http, $action, $workflowEvent )
{
$eventID = $workflowEvent->attribute( "id" );
$module =& $GLOBALS['eZRequestedModule'];
//$siteIni = eZINI::instance();
switch ( $action )
{
case 'AddApproveUsers' :
{
$userClassNames = eZUser::fetchUserClassNames();
if ( count( $userClassNames ) > 0 )
{
eZContentBrowse::browse( array( 'action_name' => 'SelectMultipleUsers',
'from_page' => '/workflow/edit/' . $workflowEvent->attribute( 'workflow_id' ),
'custom_action_data' => array( 'event_id' => $eventID,
'browse_action' => $action ),
'class_array' => $userClassNames ),
$module );
}
} break;
case 'RemoveApproveUsers' :
{
if ( $http->hasPostVariable( 'DeleteApproveUserIDArray_' . $eventID ) )
{
$workflowEvent->setAttribute( 'data_text3', implode( ',', array_diff( $this->attributeDecoder( $workflowEvent, 'approve_users' ),
$http->postVariable( 'DeleteApproveUserIDArray_' . $eventID ) ) ) );
}
} break;
case 'AddApproveGroups' :
case 'AddExcludeUser' :
{
$groupClassNames = eZUser::fetchUserGroupClassNames();
if ( count( $groupClassNames ) > 0 )
{
eZContentBrowse::browse( array( 'action_name' => 'SelectMultipleUsers',
'from_page' => '/workflow/edit/' . $workflowEvent->attribute( 'workflow_id' ),
'custom_action_data' => array( 'event_id' => $eventID,
'browse_action' => $action ),
'class_array' => $groupClassNames ),
$module );
}
} break;
case 'RemoveApproveGroups' :
{
if ( $http->hasPostVariable( 'DeleteApproveGroupIDArray_' . $eventID ) )
{
$workflowEvent->setAttribute( 'data_text4', implode( ',', array_diff( $this->attributeDecoder( $workflowEvent, 'approve_groups' ),
$http->postVariable( 'DeleteApproveGroupIDArray_' . $eventID ) ) ) );
}
} break;
case 'RemoveExcludeUser' :
{
if ( $http->hasPostVariable( 'DeleteExcludeUserIDArray_' . $eventID ) )
{
$workflowEvent->setAttribute( 'data_text2', implode( ',', array_diff( $this->attributeDecoder( $workflowEvent, 'selected_usergroups' ),
$http->postVariable( 'DeleteExcludeUserIDArray_' . $eventID ) ) ) );
}
} break;
case 'AddExcludedGroups' :
{
// TODO:
// .....
} break;
case 'RemoveExcludedGroups' :
{
// TODO:
// .....
} break;
}
}