LFT
  • Namespace
  • Class
  • Tree

Namespaces

  • Docoflow
    • Contracts
    • Entity
    • Facades
    • Models
    • Traits
  • Docolight
    • Agno
      • Traits
    • Container
    • Http
      • Contracts
    • Rest
      • Handler
      • Http
    • Support
      • Debug
      • Traits
  • Docotory
    • Traits
  • None

Classes

  • Docoflow\Docoflow
  • Docoflow\Entity\Group
  • Docoflow\Entity\Step
  • Docoflow\Entity\Verificator
  • Docoflow\Facades\Action
  • Docoflow\Facades\Activity
  • Docoflow\Facades\Flo
  • Docoflow\Facades\StateActivity
  • Docoflow\Flo
  • Docoflow\Models\Workflow
  • Docoflow\Models\WorkflowAction
  • Docoflow\Models\WorkflowActivity
  • Docoflow\Models\WorkflowGroups
  • Docoflow\Models\WorkflowNotification
  • Docoflow\Models\WorkflowState
  • Docoflow\Models\WorkflowStateActivity
  • Docoflow\Models\WorkflowStep
  • Docoflow\Models\WorkflowVerificator
  • Docolight
  • Docolight\Agno\AgnoModule
  • Docolight\Container\Container
  • Docolight\Http\Headers
  • Docolight\Http\JsonResponse
  • Docolight\Http\MimeResponse
  • Docolight\Http\Response
  • Docolight\Http\ResponseFactory
  • Docolight\Rest\Handler\RestfulErrorHandler
  • Docolight\Rest\Http\RestFulController
  • Docolight\Support\ActiveRecordWrapper
  • Docolight\Support\Arr
  • Docolight\Support\Carbonate
  • Docolight\Support\ClassLoader
  • Docolight\Support\Collection
  • Docolight\Support\CollectionDataProvider
  • Docolight\Support\Debug\Dumper
  • Docolight\Support\Debug\HtmlDumper
  • Docolight\Support\Facade
  • Docolight\Support\Factory
  • Docolight\Support\Fluent
  • Docolight\Support\Html
  • Docolight\Support\IterablePager
  • Docolight\Support\Repository
  • Docolight\Support\Set
  • Docolight\Support\Str
  • Docotory\Factory

Interfaces

  • Docoflow\Contracts\DocoflowContract
  • Docoflow\Contracts\ValidationStatus
  • Docolight\Http\Contracts\Arrayable

Traits

  • Docoflow\Traits\BulkValidator
  • Docoflow\Traits\Entity
  • Docoflow\Traits\HasMutator
  • Docoflow\Traits\Validable
  • Docolight\Agno\Traits\HasAssetsUrl
  • Docolight\Agno\Traits\HasAutoload
  • Docolight\Support\Traits\Macroable
  • Docotory\Traits\HasFactories

Exceptions

  • Docolight\Container\BindingResolutionException
  • Docotory\ResolvingTypeException

Functions

  • array_add
  • array_build
  • array_collapse
  • array_divide
  • array_dot
  • array_except
  • array_first
  • array_flatten
  • array_forget
  • array_get
  • array_has
  • array_last
  • array_only
  • array_pluck
  • array_pull
  • array_replace_value
  • array_set
  • array_sort
  • array_sort_recursive
  • array_where
  • cache
  • camel_case
  • class_basename
  • class_uses_recursive
  • collect
  • container
  • data_get
  • dd
  • def
  • dump
  • e
  • ends_with
  • fluent
  • get
  • head
  • input
  • last
  • object_get
  • preg_replace_sub
  • request
  • response
  • session
  • snake_case
  • starts_with
  • str_contains
  • str_finish
  • str_is
  • str_limit
  • str_random
  • str_replace_array
  • str_slug
  • studly_case
  • title_case
  • trait_uses_recursive
  • transaction
  • trimtolower
  • value
  • with
  1 <?php
  2 
  3 namespace Docoflow\Models;
  4 
  5 use Yii;
  6 use CDbCriteria;
  7 use CActiveRecord;
  8 use CActiveDataProvider;
  9 
 10 /**
 11  * This is the model class for table "workflow_state_activity".
 12  *
 13  * The followings are the available columns in table 'workflow_state_activity':
 14  *
 15  * @property int $id
 16  * @property int $activity_id
 17  * @property int $state_id
 18  * @property int $assignor
 19  * @property int $assignee
 20  * @property float $is_failed
 21  * @property float $is_notification
 22  * @property string $notification_subject
 23  * @property string $notification_body
 24  */
 25 class WorkflowStateActivity extends CActiveRecord
 26 {
 27     /**
 28      * Get DB Connection
 29      *
 30      * @return \CDbConnection
 31      */
 32     public function getDbConnection()
 33     {
 34         Yii::app()->container->bindIf('docoflow.connection', function ($container) {
 35             return Yii::app()->db;
 36         });
 37 
 38         return Yii::app()->container->make('docoflow.connection');
 39     }
 40 
 41     /**
 42      * Returns the static model of the specified AR class.
 43      *
 44      * @param string $className active record class name.
 45      *
 46      * @return WorkflowStateActivity the static model class
 47      */
 48     public static function model($className = __CLASS__)
 49     {
 50         return parent::model($className);
 51     }
 52 
 53     /**
 54      * @return string the associated database table name
 55      */
 56     public function tableName()
 57     {
 58         return '"workflow_state_activity"';
 59     }
 60 
 61     /**
 62      * @return array validation rules for model attributes.
 63      */
 64     public function rules()
 65     {
 66         // NOTE: you should only define rules for those attributes that
 67         // will receive user inputs.
 68         return array(
 69             array('activity_id, state_id, assignor, assignee', 'required'),
 70             array('activity_id, state_id, assignor, assignee', 'numerical', 'integerOnly' => true),
 71             array('is_failed, is_notification', 'numerical'),
 72             array('notification_subject, notification_body', 'length', 'max' => 512),
 73             // The following rule is used by search().
 74             // Please remove those attributes that should not be searched.
 75             array('id, activity_id, state_id, assignor, assignee, is_failed, is_notification, notification_subject, notification_body', 'safe', 'on' => 'search'),
 76         );
 77     }
 78 
 79     /**
 80      * @return array relational rules.
 81      */
 82     public function relations()
 83     {
 84         // NOTE: you may need to adjust the relation name and the related
 85         // class name for the relations automatically generated below.
 86         return array(
 87             'activity' => [static::BELONGS_TO, WorkflowActivity::class, 'activity_id'],
 88         );
 89     }
 90 
 91     /**
 92      * @return array customized attribute labels (name=>label)
 93      */
 94     public function attributeLabels()
 95     {
 96         return array(
 97             'id' => 'ID',
 98             'activity_id' => 'Activity',
 99             'state_id' => 'State',
100             'assignor' => 'Assignor',
101             'assignee' => 'Assignee',
102             'is_failed' => 'Is Failed',
103             'is_notification' => 'Is Notification',
104             'notification_subject' => 'Notification Subject',
105             'notification_body' => 'Notification Body',
106         );
107     }
108 
109     /**
110      * Retrieves a list of models based on the current search/filter conditions.
111      *
112      * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
113      */
114     public function search()
115     {
116         // Warning: Please modify the following code to remove attributes that
117         // should not be searched.
118 
119         $criteria = new CDbCriteria();
120 
121         $criteria->compare('"id"', $this->id);
122         $criteria->compare('"activity_id"', $this->activity_id);
123         $criteria->compare('"state_id"', $this->state_id);
124         $criteria->compare('"assignor"', $this->assignor);
125         $criteria->compare('"assignee"', $this->assignee);
126         $criteria->compare('"is_failed"', $this->is_failed);
127         $criteria->compare('"is_notification"', $this->is_notification);
128         $criteria->compare('"notification_subject"', $this->notification_subject, true);
129         $criteria->compare('"notification_body"', $this->notification_body, true);
130 
131         return new CActiveDataProvider($this, array(
132             'criteria' => $criteria,
133         ));
134     }
135 }
136 
LFT API documentation generated by ApiGen