• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP eZWorkflowEventType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中eZWorkflowEventType的典型用法代码示例。如果您正苦于以下问题:PHP eZWorkflowEventType类的具体用法?PHP eZWorkflowEventType怎么用?PHP eZWorkflowEventType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了eZWorkflowEventType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: attributes

    function attributes()
    {
        return array_merge( array( 'sections',
                                   'languages',
                                   'users',
                                   'usergroups' ),
                            eZWorkflowEventType::attributes() );

    }
开发者ID:nottavi,项目名称:ezpublish,代码行数:9,代码来源:ezfinishuserregistertype.php


示例2: attribute

 function attribute($attr)
 {
     switch ($attr) {
         case 'state_group':
             return eZContentObjectStateGroup::fetchByOffset();
         default:
             return eZWorkflowEventType::attribute($attr);
     }
 }
开发者ID:gggeek,项目名称:ezworkflowcollection,代码行数:9,代码来源:objectstateupdatetype.php


示例3: attribute

 function attribute($attr)
 {
     switch ($attr) {
         case 'sections':
             $sections = eZSection::fetchList(false);
             foreach ($sections as $key => $section) {
                 $sections[$key]['Name'] = $section['name'];
                 $sections[$key]['value'] = $section['id'];
             }
             return $sections;
             break;
         case 'languages':
             return eZContentLanguage::fetchList();
             break;
     }
     return eZWorkflowEventType::attribute($attr);
 }
开发者ID:gggeek,项目名称:ezworkflowcollection,代码行数:17,代码来源:approvelocationtype.php


示例4: isset

        $deleteNodeIds = isset($parameters['node_id_list']) ? $parameters['node_id_list'] : array();

        $removeLocationNodeIds = array();
        if(isset($parameters['node_list']))
        {
            foreach($parameters['node_list'] as $node)
            {
                $removeLocationNodeIds[] = $node->attribute('node_id');
            }
        }
        
        $nodeIds = array_merge($deleteNodeIds, $removeLocationNodeIds);

        /* @type $selections MMSelections[] */
        $selections = MMSelections::fetchObjectList( 
            MMSelections::definition(), 
            null, 
            array( 'node_id' => array( array( $nodeIds ) ) ) 
        );

        foreach( $selections as $selection )
        {
            $selection->remove();
        }
        
        return self::STATUS_ACCEPTED;
    }
}

eZWorkflowEventType::registerEventType( mySelectionRemoveWorkflowType::WORKFLOW_TYPE_STRING, "mySelectionRemoveWorkflowType" );
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:myselectionremoveworkflowtype.php


示例5: array

                // smart-cache enabled version
                // get list of nodes whose view-cache is expired
                $assigned_nodes = array();
                eZContentCacheManager::nodeListForObject($object, true, eZContentCacheManager::CLEAR_DEFAULT, $assigned_nodes, $handledObjectList);
                foreach ($assigned_nodes as $i => $nodeID) {
                    $assigned_nodes[$i] = eZContentObjectTreeNode::fetch($nodeID);
                }
            }
            $domains = $ini->variable('ExpireRemoteCacheFlowSettings', 'ExpireDomains');
            foreach ($assigned_nodes as $assigned_node) {
                // for every node, call eZHTTPCacheManager to clean the remote cache
                $url = $assigned_node->urlAlias();
                if (is_array($domains) && (count($domains) > 1 || count($domains) > 0 && $domains[0] != '')) {
                    eZURI::transformURI($url);
                    foreach ($domains as $domain) {
                        eZHTTPCacheManager::execute($domain . $url);
                    }
                } else {
                    eZURI::transformURI($url, false, 'full');
                    eZHTTPCacheManager::execute($url);
                }
            }
        } else {
            eZDebug::writeError('Expire remote cache event triggered for inexisting object: ' . $objectId);
            return eZWorkflowType::STATUS_WORKFLOW_CANCELLED;
        }
        return eZWorkflowType::STATUS_ACCEPTED;
    }
}
eZWorkflowEventType::registerEventType(expireremotecacheflowType::WORKFLOW_TYPE_STRING, 'expireremotecacheflowtype');
开发者ID:gggeek,项目名称:ezworkflowcollection,代码行数:30,代码来源:expireremotecacheflowtype.php


示例6: array

    {
        $filter = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
        foreach ($order->productItems() as $item) {
            $dataMap = $item['item_object']->contentObject()->dataMap();
            if (!array_key_exists('paymethod', $dataMap)) {
                return $filter;
            }
            $paymethod = $dataMap['paymethod'];
            $content = $paymethod->content();
            $filter = array_intersect($filter, $content);
        }
        return $filter;
    }
    public function execute($process, $event)
    {
        $parameters = $process->attribute('parameter_list');
        $order = eZOrder::fetch($parameters['order_id']);
        $filter = self::filterOrderPayment($order);
        $process->Template = array();
        $process->Template['templateName'] = 'design:workflow/ezpaymentselect.tpl';
        $process->Template['templateVars'] = array('order' => $order, 'filter' => $filter);
        if (!$this->checkPayment()) {
            return eZWorkflowType::STATUS_FETCH_TEMPLATE_REPEAT;
        } else {
            eZPaymentSelectType::storeOrderData($order, $_POST['payment'], serialize($_POST));
            return eZWorkflowType::STATUS_ACCEPTED;
        }
    }
}
eZWorkflowEventType::registerEventType(eZPaymentSelectType::WORKFLOW_TYPE_STRING, "eZPaymentSelectType");
开发者ID:namestnik,项目名称:ezpaymentselect,代码行数:30,代码来源:ezpaymentselecttype.php


示例7: foreach

            foreach ($createClasses as $class => $name) {
                $result = $this->createObject($class, $parentNodeID, $name);
            }
        }
        return eZWorkflowType::STATUS_ACCEPTED;
    }
    function createObject($classIdentifier, $parentNodeID, $name)
    {
        $user = eZUser::currentUser();
        $Class = eZContentClass::fetchByIdentifier($classIdentifier);
        if (!$Class) {
            eZDebug::writeError("No class with identifier {$classIdentifier}", "classCreation");
            return false;
        }
        $contentObject = $Class->instantiate($user->attribute('contentobject_id'));
        $nodeAssignment = eZNodeAssignment::create(array('contentobject_id' => $contentObject->attribute('id'), 'contentobject_version' => $contentObject->attribute('current_version'), 'parent_node' => $parentNodeID, 'is_main' => 1));
        $nodeAssignment->store();
        $version = $contentObject->version(1);
        $version->setAttribute('modified', eZDateTime::currentTimeStamp());
        $version->setAttribute('status', eZContentObjectVersion::STATUS_DRAFT);
        $version->store();
        $contentObjectID = $contentObject->attribute('id');
        $attributes = $contentObject->attribute('contentobject_attributes');
        $attributes[0]->fromString($name);
        $attributes[0]->store();
        $operationResult = eZOperationHandler::execute('content', 'publish', array('object_id' => $contentObjectID, 'version' => 1));
        return true;
    }
}
eZWorkflowEventType::registerEventType(autocreateObjectType::WORKFLOW_TYPE_STRING, "autocreateObjectType");
开发者ID:rmdev,项目名称:lisautocreateobject,代码行数:30,代码来源:autocreateobjecttype.php


示例8: __construct

<?php

class sCacheCookieType extends eZWorkflowEventType
{
    const WORKFLOW_TYPE_STRING = 'scachecookie';
    const WORKFLOW_TYPE_CLASS = 'sCacheCookieType';
    const WORKFLOW_TYPE_DESC = 'Update Cache Cookie';
    function __construct()
    {
        $this->eZWorkflowEventType(self::WORKFLOW_TYPE_STRING, self::WORKFLOW_TYPE_DESC);
        $this->setTriggerTypes(array('user' => array('preferences' => array('before', 'after')), 'shop' => array('addtobasket' => array('before', 'after'), 'updatebasket' => array('before', 'after'))));
    }
    function execute($process, $event)
    {
        sCacheCookieHelper::setCookie();
        return eZWorkflowType::STATUS_ACCEPTED;
    }
}
eZWorkflowEventType::registerEventType(sCacheCookieType::WORKFLOW_TYPE_STRING, sCacheCookieType::WORKFLOW_TYPE_CLASS);
开发者ID:stevoland,项目名称:ez_scachecookie,代码行数:19,代码来源:scachecookietype.php


示例9: attribute

 function attribute($attr)
 {
     switch ($attr) {
         case 'contentclass_list':
             return eZContentClass::fetchList(eZContentClass::VERSION_STATUS_DEFINED, true);
             break;
         case 'contentclassattribute_list':
             //                $postvarname = 'WorkflowEvent' . '_event_ezwaituntildate_' .'class_' . $workflowEvent->attribute( 'id' ); and $http->hasPostVariable( $postvarname )
             if (isset($GLOBALS['eZWaitUntilDateSelectedClass'])) {
                 $classID = $GLOBALS['eZWaitUntilDateSelectedClass'];
             } else {
                 // if nothing was preselected, we will use the first one:
                 // POSSIBLE ENHANCEMENT: in the common case, the contentclass_list fetch will be called twice
                 $classList = eZWaitUntilDateType::attribute('contentclass_list');
                 if (isset($classList[0])) {
                     $classID = $classList[0]->attribute('id');
                 } else {
                     $classID = false;
                 }
             }
             if ($classID) {
                 return eZContentClassAttribute::fetchListByClassID($classID);
             }
             return array();
             break;
         case 'has_class_attributes':
             // for the backward compatibility:
             return 1;
             break;
         default:
             return eZWorkflowEventType::attribute($attr);
     }
 }
开发者ID:nfrp,项目名称:ezpublish,代码行数:33,代码来源:ezwaituntildatetype.php


示例10: foreach

            $classIdentifier = $version->ContentObject->ClassIdentifier;
            // Verifica se la classe è corretta
            if ($classIdentifier == self::PUBLISH_CLASS) {
                $objectAttributes = $version->attribute('contentobject_attributes');
                // cicla sugl iattributi
                foreach ($objectAttributes as $objectAttribute) {
                    $contentClassAttributeIdentifier = $objectAttribute->ContentClassAttributeIdentifier;
                    if ($contentClassAttributeIdentifier == 'published') {
                        // recupera la data di pubblicazione
                        $publisheddate = $objectAttribute->attribute('content');
                    }
                }
                // set della data di pubblicazione
                if ($publisheddate instanceof eZDateTime || $publisheddate instanceof eZDate) {
                    $object->setAttribute('published', $publisheddate->timeStamp());
                    $object->store();
                    eZContentOperationCollection::registerSearchObject($object->attribute('id'));
                    eZDebug::writeNotice('Workflow change object publish date', __METHOD__);
                }
                //echo('<br>*** die workflow ***');
                //die();
            }
            return eZWorkflowType::STATUS_ACCEPTED;
        } catch (Exception $e) {
            eZDebug::writeError($e->getMessage(), __METHOD__);
            return eZWorkflowType::STATUS_REJECTED;
        }
    }
}
eZWorkflowEventType::registerEventType(ImportComunicatiType::WORKFLOW_TYPE_STRING, 'ImportComunicatiType');
开发者ID:informaticatrentina,项目名称:pat_base,代码行数:30,代码来源:importcomunicatitype.php


示例11: attribute

 function attribute($attr)
 {
     switch ($attr) {
         case 'sections':
             $sections = eZSection::fetchList(false);
             foreach ($sections as $key => $section) {
                 $sections[$key]['Name'] = $section['name'];
                 $sections[$key]['value'] = $section['id'];
             }
             return $sections;
             break;
         case 'languages':
             return eZContentLanguage::fetchList();
             break;
         case 'usergroups':
             $groups = eZPersistentObject::fetchObjectList(eZContentObject::definition(), array('id', 'name'), array('contentclass_id' => 3, 'status' => eZContentObject::STATUS_PUBLISHED), null, null, false);
             foreach ($groups as $key => $group) {
                 $groups[$key]['Name'] = $group['name'];
                 $groups[$key]['value'] = $group['id'];
             }
             return $groups;
             break;
         case 'contentclass_list':
             $classes = eZContentClass::fetchList(eZContentClass::VERSION_STATUS_DEFINED, true, false, array('name' => 'asc'));
             $classList = array();
             for ($i = 0; $i < count($classes); $i++) {
                 $classList[$i]['Name'] = $classes[$i]->attribute('name');
                 $classList[$i]['value'] = $classes[$i]->attribute('id');
             }
             return $classList;
             break;
         case 'workflow_list':
             $workflows = eZWorkflow::fetchList();
             $workflowList = array();
             for ($i = 0; $i < count($workflows); $i++) {
                 $workflowList[$i]['Name'] = $workflows[$i]->attribute('name');
                 $workflowList[$i]['value'] = $workflows[$i]->attribute('id');
             }
             return $workflowList;
             break;
     }
     return eZWorkflowEventType::attribute($attr);
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:43,代码来源:ezmultiplexertype.php


示例12: __construct

 public function __construct()
 {
     parent::eZWorkflowEventType(self::EVENT_TYPE, self::EVENT_NAME);
     $this->setTriggerTypes(array('content' => array('publish' => array('after'))));
 }
开发者ID:gggeek,项目名称:ezworkflowcollection,代码行数:5,代码来源:copynodetoallparentlocationstype.php


示例13: attribute

 function attribute($attr)
 {
     switch ($attr) {
         case 'contentclass_list':
             return eZContentClass::fetchList(eZContentClass::VERSION_STATUS_DEFINED, true);
             break;
         default:
             return eZWorkflowEventType::attribute($attr);
     }
 }
开发者ID:gggeek,项目名称:ezworkflowcollection,代码行数:10,代码来源:multipublishtype.php


示例14: storeEventData

 function storeEventData($event, $version)
 {
     $eventData = eZApprove2Event::fetch($event->attribute('id'), 1);
     switch ($version) {
         case 0:
             $eventData->publish();
             $eventData->removeDraft();
             break;
         case 1:
             $eventData->store();
             break;
     }
     eZWorkflowEventType::storeEventData($event, $version);
 }
开发者ID:brucem,项目名称:ezapprove2,代码行数:14,代码来源:ezapprove2type.php


示例15: execute

     * @param eZWorkflowEvent $event
     * @return int
     */
    function execute( $process, $event )
    {
        // Get some information about the object being passed
        $parameters = $process->attribute( 'parameter_list' );
        $object     = eZContentObject::fetch( $parameters['object_id'] );

        if($object->ClassIdentifier != 'article')
            return self::STATUS_ACCEPTED;

        /* @type $dataMap eZContentObjectAttribute[] */
        $dataMap = $object->dataMap();

        if(isset($dataMap['source']))
        {
            $sourceString = MMNewsSource::getSourceString($object);
            if($sourceString)
            {
                $dataMap['source']->setAttribute('data_text', $sourceString);
                $dataMap['source']->store();
            }
            eZContentCacheManager::clearContentCache($object->attribute('id'));
        }
        return self::STATUS_ACCEPTED;
    }
}

eZWorkflowEventType::registerEventType( updateNewsSourceType::WORKFLOW_TYPE_STRING, "updateNewsSourceType" );
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:updatenewssourcetype.php


示例16: fetchHTTPInput

    {
        $http_input_sa = $base . '_event_' . self::WORKFLOW_TYPE_STRING . '_source_attribute_' . $event->attribute('id');
        $http_input_er = $base . '_event_' . self::WORKFLOW_TYPE_STRING . '_external_redirect_' . $event->attribute('id');
        $http_input_ar = $base . '_event_' . self::WORKFLOW_TYPE_STRING . '_at_root_' . $event->attribute('id');
        /// @todo add more validation for _er and _ar: should be bool values...
        if ($http->hasPostVariable($http_input_sa)) {
            $returnState = eZInputValidator::STATE_ACCEPTED;
        } else {
            $returnState = eZInputValidator::STATE_INVALID;
            //$reason[ 'text' ] = "Select at least one group, then one state.";
        }
        return $returnState;
    }
    function fetchHTTPInput($http, $base, $event)
    {
        $http_input_sa = $base . '_event_' . self::WORKFLOW_TYPE_STRING . '_source_attribute_' . $event->attribute('id');
        $http_input_er = $base . '_event_' . self::WORKFLOW_TYPE_STRING . '_external_redirect_' . $event->attribute('id');
        $http_input_ar = $base . '_event_' . self::WORKFLOW_TYPE_STRING . '_at_root_' . $event->attribute('id');
        if ($http->hasPostVariable($http_input_sa)) {
            $event->setAttribute("data_text1", $http->postVariable($http_input_sa));
        }
        if ($http->hasPostVariable($http_input_er)) {
            $event->setAttribute("data_int1", (bool) $http->postVariable($http_input_er));
        }
        if ($http->hasPostVariable($http_input_ar)) {
            $event->setAttribute("data_int2", (bool) $http->postVariable($http_input_ar));
        }
    }
}
eZWorkflowEventType::registerEventType(addUrlAliasType::WORKFLOW_TYPE_STRING, 'addUrlAliasType');
开发者ID:gggeek,项目名称:ezworkflowcollection,代码行数:30,代码来源:addurlaliastype.php


示例17: array

                return eZWorkflowType::STATUS_ACCEPTED;
            }
        }
        // Get send item, and check that is contains the object id.
        if (!$sendItem) {
            return eZWorkflowType::STATUS_REJECTED;
        }
        $sendItemIDList = $sendItem->attribute('newsletter_related_object_list');
        if (!$sendItemIDList || !in_array($objectID, $sendItemIDList)) {
            return eZWorkflowType::STATUS_REJECTED;
        }
        $sendNodeIDArray = array();
        // Set session variables
        foreach ($sendItemIDList as $sendObjectID) {
            $sendObject = eZContentObject::fetch($sendObjectID);
            if ($sendObject) {
                foreach ($sendObject->assignedNodes(false) as $nodeArray) {
                    $http->setSessionVariable('NewletterNodeMap_' . $nodeArray['node_id'], $sendItem->attribute('id'));
                    $sendNodeIDArray[] = $nodeArray['node_id'];
                }
            }
        }
        $globalNodeIDList = array_unique(array_merge($globalNodeIDList, $sendNodeIDArray));
        $http->setSessionVariable('NewsletterNodeIDArray', $globalNodeIDList);
        // Add object read
        $sendItem->addObjectRead($objectID);
        return eZWorkflowType::STATUS_ACCEPTED;
    }
}
eZWorkflowEventType::registerEventType(eZNewsletterReadType::EventName, "eznewsletterreadtype");
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:30,代码来源:eznewsletterreadtype.php


示例18: foreach

            foreach ( $orderItems as $orderItem )
            {
                if ( $orderItem->attribute( 'type' ) == 'ezsimpleshipping' )
                {
                    $addShipping = false;
                    break;
                }
            }
            if ( $addShipping )
            {
                $productCollection = $order->attribute( 'productcollection' );
                $orderCurrency = $productCollection->attribute( 'currency_code' );

                $cost = eZShopFunctions::convertAdditionalPrice( $orderCurrency, $cost );

                $orderItem = new eZOrderItem( array( 'order_id' => $orderID,
                                                     'description' => $description,
                                                     'price' => $cost,
                                                     'type' => 'ezsimpleshipping' )
                                              );
                $orderItem->store();
            }
        }
        return eZWorkflowType::STATUS_ACCEPTED;
    }
}

eZWorkflowEventType::registerEventType( eZSimpleShippingType::WORKFLOW_TYPE_STRING, "eZSimpleShippingType" );

?>
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:30,代码来源:ezsimpleshippingtype.php


示例19: foreach

        $http = eZHTTPTool::instance();
        eZDebug::writeNotice($parameters, "parameters");
        $orderID = $parameters['order_id'];
        $order = eZOrder::fetch($orderID);
        if (empty($orderID) || get_class($order) != 'ezorder') {
            eZDebug::writeWarning("Can't proceed without a Order ID.", "SimpleStockCheck");
            return eZWorkflowEventType::STATUS_FETCH_TEMPLATE_REPEAT;
        }
        // Decrement the quantitity field
        $order = eZOrder::fetch($orderID);
        $productCollection = $order->productCollection();
        $ordereditems = $productCollection->itemList();
        foreach ($ordereditems as $item) {
            $contentObject = $item->contentObject();
            $contentObjectVersion = $contentObject->version($contentObject->attribute('current_version'));
            $contentObjectAttributes = $contentObjectVersion->contentObjectAttributes();
            foreach (array_keys($contentObjectAttributes) as $key) {
                $contentObjectAttribute = $contentObjectAttributes[$key];
                $contentClassAttribute = $contentObjectAttribute->contentClassAttribute();
                // Each attribute has an attribute identifier called 'quantity' that identifies it.
                if ($contentClassAttribute->attribute("identifier") == "quantity") {
                    $contentObjectAttribute->setAttribute("data_int", $contentObjectAttribute->attribute("value") - $item->ItemCount);
                    $contentObjectAttribute->store();
                }
            }
        }
        return eZWorkflowEventType::STATUS_ACCEPTED;
    }
}
eZWorkflowEventType::registerEventType(eZSimpleStockCheckType::WORKFLOW_TYPE_STRING, 'ezsimplestockchecktype');
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:30,代码来源:ezsimplestockchecktype.php


示例20: eZXMLInstaller

            if( !$doc->loadXML( $xml ) )
            {
                eZDebug::writeError( "Cannot parse XML", "eZXMLPublisherType::execute" );
                return eZWorkflowType::STATUS_WORKFLOW_CANCELLED;
            }

            $xmlInstaller = new eZXMLInstaller( $doc );

            if (! $xmlInstaller->proccessXML() )
            {
                eZDebug::writeError( "Cannot proccess XML", "eZXMLPublisherType::execute" );
                return eZWorkflowType::STATUS_WORKFLOW_CANCELLED;
            }

            return eZWorkflowType::STATUS_ACCEPTED;
        }
        // otherwise we need only to enable, disable the selected features.
        else
        {
        }


        return eZWorkflowType::STATUS_ACCEPTED;
    }
}


eZWorkflowEventType::registerEventType( 'ezxmlpublisher', 'eZXMLPublisherType' );

?>
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:ezxmlpublishertype.php



注:本文中的eZWorkflowEventType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP eZWorkflowProcess类代码示例发布时间:2022-05-23
下一篇:
PHP eZWorkflowEvent类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap