/**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['template_id', 'layout_id'], 'integer'], [['name'], 'string', 'max' => 255], [['key'], 'string', 'max' => 80], [['key'], 'required'], [['template_id'], 'exist', 'skipOnError' => true, 'targetClass' => Template::className(), 'targetAttribute' => ['template_id' => 'id']], [['layout_id'], 'exist', 'skipOnError' => true, 'targetClass' => Layout::className(), 'targetAttribute' => ['layout_id' => 'id']]];
 }