public function save($data)
    {
        $result = null;
        $this->hook->attach('module.editor.save.before', $data, $result);

        if (isset($result)) {
            return $result;
        }

        if (!$this->backup($data)) {
            return false;
        }

        $result = $this->write($data['content'], $data['path']);
        $this->hook->attach('module.editor.save.after', $data, $result);
        return $result;
    }
public function save($data)
    {
        $result = null;
        $this->hook->attach('module.editor.save.before', $data, $result);

        if (isset($result)) {
            return $result;
        }

        if (!$this->backup($data)) {
            return false;
        }

        $result = $this->write($data['content'], $data['path']);
        $this->hook->attach('module.editor.save.after', $data, $result);
        return $result;
    }
public function save ( $ data ) { $ result = null ; $ this -> hook -> attach ( 'module.editor.save.before' , $ data , $ result ) ; if ( isset ( $ result ) ) { return $ result ; } if ( ! $ this -> backup ( $ data ) ) { return false ; } $ result = $ this -> write ( $ data [ 'content' ] , $ data [ 'path' ] ) ; $ this -> hook -> attach ( 'module.editor.save.after' , $ data , $ result ) ; return $ result ; }
Saves an edited file
@param array $data
@return boolean
Saves an edited file