Ejemplo n.º 1
0
 /**
  * @return mixed
  */
 public function renderGridBox()
 {
     $fileThumb = Filemanager::getThumbnail($this->fileType, $this->src, "{$this->thumbnailSize[0]}px", "{$this->thumbnailSize[1]}px");
     $toolbox = $this->renderToolbox();
     $hoverWrapper = Html::tag('div', '', ['class' => 'hover-wrapper']);
     if (isset($this->owner->model)) {
         $this->alt_text = isset($this->owner->model->file_id) ? \evneandreys\filemanager\models\Files::findOne($this->owner->model->file_id)->alt_text : false;
     }
     return Html::tag('div', $fileThumb . $hoverWrapper . $toolbox, ['class' => 'fm-section-item', 'data-name' => $this->alt_text]);
 }