Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezfinishuserregistertype.php
Go to the documentation of this file.
1 <?php
16 class eZFinishUserRegisterType extends eZWorkflowEventType {
17
18 const WORKFLOW_TYPE_STRING = "ezfinishuserregister";
19
20 public function __construct()
21 {
22 parent::__construct( eZFinishUserRegisterType::WORKFLOW_TYPE_STRING, ezpI18n::tr( 'kernel/workflow/event', "Finish User Registration" ) );
23 $this->setTriggerTypes( array( 'content' => array( 'publish' => array( 'after' ) ) ) );
24 }
25
26 function execute($process, $event)
27 {
28 //execute user register operation
29 $parameterList = $process->attribute( 'parameter_list' );
30 $objectID = $parameterList['object_id'];
31 $object = eZContentObject::fetch( $objectID );
32 // @todo: improve the possible performance.
33 if( $object->attribute( 'class_identifier' ) == 'user' )
34 {
35 $result = eZOperationHandler::execute( 'user', 'register', array( 'user_id' => $objectID ) );
36 return $result['status'];
37 }
38 }
39
40 function typeFunctionalAttributes( )
41 {
42 return array( 'selected_sections',
43 'approve_users',
44 'approve_groups',
45 'selected_usergroups',
46 'language_list',
47 'version_option' );
48 }
49
50 function attributeDecoder( $event, $attr )
51 {
52
53 }
54
55 function attributes()
56 {
57 return array_merge( array( 'sections',
58 'languages',
59 'users',
60 'usergroups' ),
61 eZWorkflowEventType::attributes() );
62
63 }
64
65 }
66
67 eZWorkflowEventType::registerEventType( eZFinishUserRegisterType::WORKFLOW_TYPE_STRING, "eZFinishUserRegisterType" );
68 ?>
eZContentObject\fetch
static fetch( $id, $asObject=true)
Definition: ezcontentobject.php:885
eZFinishUserRegisterType
Event type for finishing register type.
Definition: ezfinishuserregistertype.php:16
eZFinishUserRegisterType\WORKFLOW_TYPE_STRING
const WORKFLOW_TYPE_STRING
Definition: ezfinishuserregistertype.php:18
eZFinishUserRegisterType\attributeDecoder
attributeDecoder( $event, $attr)
Definition: ezfinishuserregistertype.php:50
eZFinishUserRegisterType\typeFunctionalAttributes
typeFunctionalAttributes()
Definition: ezfinishuserregistertype.php:40
eZFinishUserRegisterType\execute
execute($process, $event)
Definition: ezfinishuserregistertype.php:26
eZFinishUserRegisterType\attributes
attributes()
Definition: ezfinishuserregistertype.php:55
eZFinishUserRegisterType\__construct
__construct()
Definition: ezfinishuserregistertype.php:20
eZOperationHandler\execute
static execute( $moduleName, $operationName, $operationParameters, $lastTriggerName=null, $useTriggers=true)
Definition: ezoperationhandler.php:42
eZWorkflowEventType
Definition: ezworkfloweventtype.php:18
eZWorkflowEventType\registerEventType
static registerEventType( $typeString, $class_name)
Definition: ezworkfloweventtype.php:40
eZWorkflowType\attributes
attributes()
Definition: ezworkflowtype.php:225
eZWorkflowType\setTriggerTypes
setTriggerTypes( $allowedTypes)
Definition: ezworkflowtype.php:276
ezpI18n\tr
static tr( $context, $source, $comment=null, $arguments=null)
Definition: ezpi18n.php:86
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.