Example #1
0
 private function getInfoRecord()
 {
     $created = '';
     $updated = '';
     if ($this->model->hasAttribute($this->model->createdAtAttribute)) {
         $created = self::t('messages', 'Created') . ': ' . \Yii::$app->formatter->asDatetime($this->model->{$this->model->createdAtAttribute}, 'short');
     }
     if ($this->model->hasAttribute($this->model->updatedAtAttribute)) {
         $updated = self::t('messages', 'Updated') . ': ' . \Yii::$app->formatter->asDatetime($this->model->{$this->model->updatedAtAttribute}, 'short');
     }
     return strtr('{created}<br/>{updated}', ['{created}' => $created, '{updated}' => $updated]);
 }
Example #2
0
 public function duplicate()
 {
     parent::duplicate();
 }