classes/helper/AbstractImportModel.php
protected function initPreviewImage()
    {
        if (!array_key_exists('preview_image', $this->arImportData)) {
            $this->bNeedUpdatePreviewImage = false;

            return;
        }

        $this->bNeedUpdatePreviewImage = true;
        $this->sPreviewImage = trim(array_get($this->arImportData, 'preview_image'));
        if (empty($this->sPreviewImage)) {
            return;
        }

        $this->sPreviewImage = storage_path($this->sPreviewImage);
        if (!file_exists($this->sPreviewImage)) {
            $this->sPreviewImage = null;
        }
    }
protected function initPreviewImage()
    {
        if (!array_key_exists('preview_image', $this->arImportData)) {
            $this->bNeedUpdatePreviewImage = false;

            return;
        }

        $this->bNeedUpdatePreviewImage = true;
        $this->sPreviewImage = trim(array_get($this->arImportData, 'preview_image'));
        if (empty($this->sPreviewImage)) {
            return;
        }

        $this->sPreviewImage = storage_path($this->sPreviewImage);
        if (!file_exists($this->sPreviewImage)) {
            $this->sPreviewImage = null;
        }
    }
protected function initPreviewImage ( ) { if ( ! array_key_exists ( 'preview_image' , $ this -> arImportData ) ) { $ this -> bNeedUpdatePreviewImage = false ; return ; } $ this -> bNeedUpdatePreviewImage = true ; $ this -> sPreviewImage = trim ( array_get ( $ this -> arImportData , 'preview_image' ) ) ; if ( empty ( $ this -> sPreviewImage ) ) { return ; } $ this -> sPreviewImage = storage_path ( $ this -> sPreviewImage ) ; if ( ! file_exists ( $ this -> sPreviewImage ) ) { $ this -> sPreviewImage = null ; } }
Init preview image path
Init preview image path