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 CDbCriteria;
  6 use CActiveRecord;
  7 use CActiveDataProvider;
  8 use Docoflow\Traits\Validable;
  9 use Docoflow\Traits\HasMutator;
 10 use Docoflow\Contracts\ValidationStatus;
 11 
 12 /**
 13  * This is the model class for table "workflow_verificator".
 14  *
 15  * The followings are the available columns in table 'workflow_verificator':
 16  *
 17  * @property integer $id
 18  * @property integer $workflow_groups_id
 19  * @property integer $user_id
 20  * @property integer $status
 21  * @property string  $message
 22  *
 23  * @author Krisan Alfa Timur <krisanalfa@docotel.co.id>
 24  */
 25 class WorkflowVerificator extends CActiveRecord implements ValidationStatus
 26 {
 27     use HasMutator, Validable;
 28 
 29     /**
 30      * Returns the static model of the specified AR class.
 31      *
 32      * @param string $className active record class name.
 33      *
 34      * @return WorkflowVerificator the static model class
 35      */
 36     public static function model($className = __CLASS__)
 37     {
 38         return parent::model($className);
 39     }
 40 
 41     /**
 42      * @return CDbConnection database connection
 43      */
 44     public function getDbConnection()
 45     {
 46         return container('docoflow.connection');
 47     }
 48 
 49     /**
 50      * @return string the associated database table name
 51      */
 52     public function tableName()
 53     {
 54         return 'workflow_verificator';
 55     }
 56 
 57     /**
 58      * @return array validation rules for model attributes.
 59      */
 60     public function rules()
 61     {
 62         // NOTE: you should only define rules for those attributes that
 63         // will receive user inputs.
 64         return array(
 65             array('workflow_groups_id', 'required'),
 66             array('workflow_groups_id, status', 'numerical', 'integerOnly' => true),
 67             array('user_id, message', 'safe'),
 68             // The following rule is used by search().
 69             // Please remove those attributes that should not be searched.
 70             array('id, workflow_groups_id, user_id, status, message', 'safe', 'on' => 'search'),
 71         );
 72     }
 73 
 74     /**
 75      * @return array relational rules.
 76      */
 77     public function relations()
 78     {
 79         // NOTE: you may need to adjust the relation name and the related
 80         // class name for the relations automatically generated below.
 81         return array(
 82             'group' => array(static::BELONGS_TO, '\Docoflow\Models\WorkflowGroups', 'workflow_groups_id'),
 83         );
 84     }
 85 
 86     /**
 87      * @return array customized attribute labels (name=>label)
 88      */
 89     public function attributeLabels()
 90     {
 91         return array(
 92             'id' => 'ID',
 93             'workflow_groups_id' => 'Workflow Groups',
 94             'user_id' => 'User',
 95             'status' => 'Status',
 96             'message' => 'Message',
 97         );
 98     }
 99 
100     /**
101      * Retrieves a list of models based on the current search/filter conditions.
102      *
103      * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
104      */
105     public function search()
106     {
107         // Warning: Please modify the following code to remove attributes that
108         // should not be searched.
109 
110         $criteria = new CDbCriteria();
111 
112         $criteria->compare('id', $this->id);
113         $criteria->compare('workflow_groups_id', $this->workflow_groups_id);
114         $criteria->compare('user_id', $this->user_id);
115         $criteria->compare('status', $this->status);
116         $criteria->compare('message', $this->message, true);
117 
118         return new CActiveDataProvider($this, array(
119             'criteria' => $criteria,
120         ));
121     }
122 
123     /**
124      * Get user information from mutator
125      *
126      * @return mixed
127      */
128     public function getUser()
129     {
130         if (static::hasMutator('user')) {
131             return static::callMutator('user', [static::getInstance()]);
132         }
133     }
134 }
135 
LFT API documentation generated by ApiGen