label) * @var string[] $rules list of validation rules * @var array $relations list of relations (name => relation declaration) */ use yii\helpers\Inflector; echo " namespace ns ?>; use Yii; use raoul2000\workflow\base\SimpleWorkflowBehavior; use yii\helpers\ArrayHelper; /** * This is the base-model class for table "". * columns as $column): ?> * @property phpType} \${$column->name}\n" ?> * $relation): ?> * @property \\ */ class extends baseClass, '\\') . "\n" ?> { workflow)){ ?> const TR_WORKFLOW = 'workflow ?>'; /** * @var array Attributo di relazione */ public $attrMm; /** * @var array Attributo di relazione */ public $attrMm; public $language_source; workflow)){ ?> /** * @inheritdoc */ public function behaviors() { return ArrayHelper::merge(parent::behaviors(), [ [ 'class' => SimpleWorkflowBehavior::className(), 'defaultWorkflowId' => self::TR_WORKFLOW, 'propagateErrorsToModel' => true, ], ]); } /** * @inheritdoc */ public static function tableName() { return ''; } /** * @inheritdoc */ public function rules() { return [, ['language_source', 'safe'], $value): ?> [['attrMm'], 'safe'], [['attrMm'], 'required'], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'language_source' => \Yii::t('amostranslation', 'Select another source language'), $label): ?> " . $generator->generateString($label) . ",\n" ?> $value): ?> '' => \Yii::t('amostranslation', ''), 'attrMm' => \Yii::t('amostranslation', ''), ]; } $relation): ?> /** * @return \yii\db\ActiveQuery */ public function get() { } /** * @return \yii\db\ActiveQuery */ public function get() { return $this->(\backend\modules\\models\::className(), ['id' => '_id'])->via('s'); } public function getAttrMm($separator = ' '){ $ritorno = ""; $ind = 0; foreach((array) $this-> as $str){ $ritorno .= (($ind == 0)? '': ', ') . $str['']; $ind++; } return $ritorno; } public function getAttrMm(){ $ritorno = ""; $ritorno .= '' . $this->->; return $ritorno; } /** * @return \yii\db\ActiveQuery */ public function get() { return $this->(\backend\modules\\models\::className(), ['id' => '_id'])->via('s'); } public function getAttrMm($separator = ' '){ $ritorno = ""; $ind = 0; foreach((array) $this-> as $str){ $ritorno .= (($ind == 0)? '':', ') . $str['']; $ind++; } return $ritorno; } public function getAttrMm(){ $ritorno = ""; $ritorno .= '' . $this->->; $ind++; return $ritorno; } }