100], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => 'Mall ID', 'addons_name' => 'Addons Name', 'source_table' => 'Source Table', 'source_table_id' => 'Source Table ID', 'score_log_id' => 'Score Log Id', 'status' => 'Status', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } /** * @param array $params * * @return bool|self */ public static function setData(array $params) { try { $model = new static(); $model->loadDefaultValues(); if (!$model->load($params, '')) { throw new RuntimeException($model->getErrorMessage()); } if (!$model->save()) { throw new RuntimeException($model->getErrorMessage()); } return $model; } catch (Exception $e) { static::$static_error = $e->getMessage(); return false; } } }