[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/kernel/classes/ -> ezworkflowgrouplink.php (source)

   1  <?php
   2  //
   3  // Definition of eZContentClass class
   4  //
   5  //
   6  // SOFTWARE NAME: eZ publish
   7  // SOFTWARE RELEASE: 3.9.0
   8  // BUILD VERSION: 17785
   9  // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
  10  // SOFTWARE LICENSE: GNU General Public License v2.0
  11  // NOTICE: >
  12  //   This program is free software; you can redistribute it and/or
  13  //   modify it under the terms of version 2.0  of the GNU General
  14  //   Public License as published by the Free Software Foundation.
  15  //
  16  //   This program is distributed in the hope that it will be useful,
  17  //   but WITHOUT ANY WARRANTY; without even the implied warranty of
  18  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19  //   GNU General Public License for more details.
  20  //
  21  //   You should have received a copy of version 2.0 of the GNU General
  22  //   Public License along with this program; if not, write to the Free
  23  //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  24  //   MA 02110-1301, USA.
  25  //
  26  //
  27  
  28  //!! eZKernel
  29  //! The class eZWorkflowGroupLink
  30  /*!
  31  
  32  */
  33  
  34  include_once ( "lib/ezdb/classes/ezdb.php" );
  35  include_once ( "kernel/classes/ezpersistentobject.php" );
  36  include_once ( "kernel/classes/ezworkflowgroup.php" );
  37  
  38  class eZWorkflowGroupLink extends eZPersistentObject
  39  {
  40      function eZWorkflowGroupLink( $row )
  41      {
  42          $this->eZPersistentObject( $row );
  43      }
  44  
  45      function definition()
  46      {
  47          return array( "fields" => array( "workflow_id" => array( 'name' => "WorkflowID",
  48                                                                   'datatype' => 'integer',
  49                                                                   'default' => 0,
  50                                                                   'required' => true,
  51                                                                   'foreign_class' => 'eZWorkflow',
  52                                                                   'foreign_attribute' => 'id',
  53                                                                   'multiplicity' => '1..*' ),
  54                                           "workflow_version" => array( 'name' => "WorkflowVersion",
  55                                                                        'datatype' => 'integer',
  56                                                                        'default' => 0,
  57                                                                        'required' => true ),
  58                                           "group_id" => array( 'name' => "GroupID",
  59                                                                'datatype' => 'integer',
  60                                                                'default' => 0,
  61                                                                'required' => true,
  62                                                                'foreign_class' => 'eZWorkflowGroup',
  63                                                                'foreign_attribute' => 'id',
  64                                                                'multiplicity' => '1..*' ),
  65                                           "group_name" => array( 'name' => "GroupName",
  66                                                                  'datatype' => 'string',
  67                                                                  'default' => '',
  68                                                                  'required' => true ) ),
  69                        "keys" => array( "workflow_id", "workflow_version", "group_id" ),
  70                        "class_name" => "eZWorkflowGroupLink",
  71                        "sort" => array( "workflow_id" => "asc" ),
  72                        "name" => "ezworkflow_group_link" );
  73      }
  74  
  75      function create( $workflow_id, $workflow_version, $group_id, $group_name )
  76      {
  77          $row = array("workflow_id" => $workflow_id,
  78                       "workflow_version" => $workflow_version,
  79                       "group_id" => $group_id,
  80                       "group_name" => $group_name);
  81          return new eZWorkflowGroupLink( $row );
  82      }
  83  
  84      /*!
  85       \note Transaction unsafe. If you call several transaction unsafe methods you must enclose
  86       the calls within a db transaction; thus within db->begin and db->commit.
  87       */
  88      function remove( $workflow_id, $workflow_version, $group_id )
  89      {
  90          eZPersistentObject::removeObject( eZWorkflowGroupLink::definition(),
  91                                            array("workflow_id" => $workflow_id,
  92                                                  "workflow_version" =>$workflow_version,
  93                                                  "group_id" => $group_id ) );
  94      }
  95  
  96      /*!
  97       \note Transaction unsafe. If you call several transaction unsafe methods you must enclose
  98       the calls within a db transaction; thus within db->begin and db->commit.
  99       */
 100      function removeGroupMembers( $group_id )
 101      {
 102          eZPersistentObject::removeObject( eZWorkflowGroupLink::definition(),
 103                                            array( "group_id" => $group_id ) );
 104      }
 105  
 106      /*!
 107       \note Transaction unsafe. If you call several transaction unsafe methods you must enclose
 108       the calls within a db transaction; thus within db->begin and db->commit.
 109       */
 110      function removeWorkflowMembers( $workflow_id, $workflow_version )
 111      {
 112          eZPersistentObject::removeObject( eZWorkflowGroupLink::definition(),
 113                                            array( "workflow_id" =>$workflow_id,
 114                                                   "workflow_version" =>$workflow_version ) );
 115      }
 116  
 117      function &fetch( $workflow_id, $workflow_version, $group_id, $asObject = true )
 118      {
 119          $object = eZPersistentObject::fetchObject( eZWorkflowGroupLink::definition(),
 120                                                      null,
 121                                                      array("workflow_id" => $workflow_id,
 122                                                            "workflow_version" =>$workflow_version,
 123                                                            "group_id" => $group_id ),
 124                                                      $asObject );
 125          return $object;
 126      }
 127  
 128      function &fetchWorkflowList( $workflow_version, $group_id, $asObject = true )
 129      {
 130          $objectList = eZPersistentObject::fetchObjectList( eZWorkflowGroupLink::definition(),
 131                                                              null,
 132                                                              array( "workflow_version" =>$workflow_version,
 133                                                                     "group_id" => $group_id ),
 134                                                              null,
 135                                                              null,
 136                                                              $asObject);
 137          return $objectList;
 138      }
 139  
 140      function fetchGroupList( $workflow_id, $workflow_version, $asObject = true )
 141      {
 142          return eZPersistentObject::fetchObjectList( eZWorkflowGroupLink::definition(),
 143                                                      null,
 144                                                      array( "workflow_id" => $workflow_id,
 145                                                             "workflow_version" =>$workflow_version ),
 146                                                      null,
 147                                                      null,
 148                                                      $asObject);
 149      }
 150  
 151      /// \privatesection
 152      var $WorkflowID;
 153      var $WorkflowVersion;
 154      var $GroupID;
 155      var $GroupName;
 156  }
 157  
 158  ?>


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7