skeeks\cms\models\forms\ViewFileEditModel::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        if (is_readable($this->rootViewFile) && file_exists($this->rootViewFile)) {
            $fp = fopen($this->rootViewFile, 'a+');
            if ($fp) {
                $content = fread($fp, filesize($this->rootViewFile));
                fclose($fp);
                $this->source = $content;
            } else {
                $this->error = "file is not exist or is not readable";
            }
        }
    }