12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace app\models;
- use Yii;
- use yii\base\Model;
- use app\models\entity\ProjectsLocotech;
- use app\models\entity\Tasks;
- use app\models\entity\Projecttypes;
- /**
- * This is the model class for table "s_regions".
- *
- * The followings are the available columns in table 's_regions':
- * @property integer $rg_id
- * @property string $rg_name
- */
- class ProjectTypesModel extends Model
- {
- public function getActoinData($entity) {
-
- $arrayResult = [];
- foreach ($entity as $item) {
-
- $arrayResult[ $item->id ] = $this->FindAction($item->action);
- }
- return $arrayResult;
- }
-
- public function FindAction($actionId)
- {
- $projectTypesEntity = Projecttypes::findOne($actionId);
- if ($projectTypesEntity) {
- return $projectTypesEntity;
- }
- return 0;
- }
- }
|