Exemplo n.º 1
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);
 /**
  * Fetches the HTTP persistent variables for this content object state and its localizations.
  *
  * "ContentObjectState" is used as base name for the persistent variables.
  *
  * @see eZHTTPPersistence
  */
 public function fetchHTTPPersistentVariables()
 {
     $translations = $this->allTranslations();
     $http = eZHTTPTool::instance();
     eZHTTPPersistence::fetch('ContentObjectState', eZContentObjectState::definition(), $this, $http, false);
     eZHTTPPersistence::fetch('ContentObjectState', eZContentObjectStateLanguage::definition(), $translations, $http, true);
 }
Exemplo n.º 3
0
         $key = $attribute->attribute('id');
         if (isset($attributeNames[$key])) {
             $attribute->setName($attributeNames[$key], $EditLanguage);
         }
     }
 }
 if ($http->hasPostVariable('ContentAttribute_description')) {
     $attributeNames = $http->postVariable('ContentAttribute_description');
     foreach ($attributes as $attribute) {
         $key = $attribute->attribute('id');
         if (isset($attributeNames[$key])) {
             $attribute->setDescription($attributeNames[$key], $EditLanguage);
         }
     }
 }
 eZHTTPPersistence::fetch('ContentClass', eZContentClass::definition(), $class, $http, false);
 if ($http->hasPostVariable('ContentClass_name')) {
     $class->setName($http->postVariable('ContentClass_name'), $EditLanguage);
 }
 if ($http->hasPostVariable('ContentClass_description')) {
     $class->setDescription($http->postVariable('ContentClass_description'), $EditLanguage);
 }
 if ($http->hasVariable('ContentClass_is_container_exists')) {
     if ($http->hasVariable('ContentClass_is_container_checked')) {
         $class->setAttribute("is_container", 1);
     } else {
         $class->setAttribute("is_container", 0);
     }
 }
 if ($http->hasVariable('ContentClass_always_available_exists')) {
     if ($http->hasVariable('ContentClass_always_available')) {
Exemplo n.º 4
0
if ( $http->hasPostVariable( "DeleteButton" ) )
{
    if ( eZHTTPPersistence::splitSelected( "WorkflowEvent", $event_list, $http, "id", $keepers, $rejects ) )
    {
        $db = eZDB::instance();
        $db->begin();
        foreach ( $rejects as $reject )
        {
            $reject->remove();
        }
        $db->commit();
        $event_list = $keepers;
    }
}

eZHTTPPersistence::fetch( "Workflow", eZWorkflow::definition(),
                          $workflow, $http, false );
if ( $http->hasPostVariable( "WorkflowTypeString" ) )
    $cur_type = $http->postVariable( "WorkflowTypeString" );

// set temporary version to edited workflow
$workflow->setVersion( 1, $event_list );

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


/********** Custom Action Code Start ***************/
 public function fetchHTTPPersistentVariables()
 {
     $http = eZHTTPTool::instance();
     eZHTTPPersistence::fetch('ContentObjectNewsletterSubscriptionList', jajNewsletterSubscriptionList::definition(), $this, $http, false);
 }