Wednesday 29 June 2011 3:13:50 pm
In kernel/state/assign.php we have this part of code: if ( eZOperationHandler::operationIsAvailable( 'content_updateobjectstate' ) )
{
$operationResult = eZOperationHandler::execute( 'content', 'updateobjectstate',
array( 'object_id' => $objectID,
'state_id_list' => $selectedStateIDList ) );
}
else
{
eZContentOperationCollection::updateObjectState( $objectID, $selectedStateIDList );
}
So there's a check if the content_updateobjectstate exists, and if ti doesn't then eZContentOperationCollection::updateObjectState() is used. Why this amibguity? Why do we have the ability to use both ways and not only one? And if I develop an extension that changes object state, what should I use? Which is the proper way of doing it?
--
Nothing is impossible. Not if you can imagine it!
Hubert Farnsworth
|