static function removeSelected($id)
 {
     eZPersistentObject::removeObject(eZWorkflowGroup::definition(), array("id" => $id));
 }
Exemplo n.º 2
0
    $user_id = $user->attribute("contentobject_id");
    $workflowGroup = eZWorkflowGroup::create($user_id);
    $workflowGroup->setAttribute("name", ezpI18n::tr('kernel/workflow/groupedit', "New WorkflowGroup"));
    $WorkflowGroupID = $workflowGroup->attribute("id");
}
//$assignedWorkflows = $workflowGroup->fetchWorkflowList();
//$isRemoveTried = false;
$http = eZHTTPTool::instance();
if ($http->hasPostVariable("DiscardButton")) {
    $Module->redirectTo($Module->functionURI("grouplist"));
    return;
}
// Validate input
$requireFixup = false;
// Apply HTTP POST variables
eZHTTPPersistence::fetch("WorkflowGroup", eZWorkflowGroup::definition(), $workflowGroup, $http, false);
// Set new modification date
$date_time = time();
$workflowGroup->setAttribute("modified", $date_time);
$user = eZUser::currentUser();
$user_id = $user->attribute("contentobject_id");
$workflowGroup->setAttribute("modifier_id", $user_id);
// Discard existing events, workflow version 1 and store version 0
if ($http->hasPostVariable("StoreButton")) {
    if ($http->hasPostVariable("WorkflowGroup_name")) {
        $name = $http->postVariable("WorkflowGroup_name");
    }
    $workflowGroup->setAttribute("name", $name);
    // Set new modification date
    $date_time = time();
    $workflowGroup->setAttribute("modified", $date_time);
Exemplo n.º 3
0
}

//$assignedWorkflows = $workflowGroup->fetchWorkflowList();
//$isRemoveTried = false;

$http = eZHTTPTool::instance();
if ( $http->hasPostVariable( "DiscardButton" ) )
{
    $Module->redirectTo( $Module->functionURI( "grouplist" ) );
    return;
}

// Validate input
$requireFixup = false;
// Apply HTTP POST variables
eZHTTPPersistence::fetch( "WorkflowGroup", eZWorkflowGroup::definition(),
                          $workflowGroup, $http, false );

// Set new modification date
$date_time = time();
$workflowGroup->setAttribute( "modified", $date_time );
$user = eZUser::currentUser();
$user_id = $user->attribute( "contentobject_id" );
$workflowGroup->setAttribute( "modifier_id", $user_id );

// Discard existing events, workflow version 1 and store version 0
if ( $http->hasPostVariable( "StoreButton" ) )
{
    if ( $http->hasPostVariable( "WorkflowGroup_name" ) )
    {
        $name = $http->postVariable( "WorkflowGroup_name" );