public function install()
    {
        if (! isset($this->complement['installation-files'])) {
            self::$errors[] = [
                'message' => $this->complement['path']['root']
            ];

            return false;
        }

        $this->deleteDirectory();
        $this->changeState();

        $installed = $this->installComplement(
            $this->complement['installation-files'],
            $this->complement['path']['root'],
            $this->complement['slug']
        );

        if ($installed) {
            self::load(
                $this->complement['config-file'],
                $this->complement['path']['root']
            );

            $this->changeState();

            return true;
        }

        return false;
    }
public function install()
    {
        if (! isset($this->complement['installation-files'])) {
            self::$errors[] = [
                'message' => $this->complement['path']['root']
            ];

            return false;
        }

        $this->deleteDirectory();
        $this->changeState();

        $installed = $this->installComplement(
            $this->complement['installation-files'],
            $this->complement['path']['root'],
            $this->complement['slug']
        );

        if ($installed) {
            self::load(
                $this->complement['config-file'],
                $this->complement['path']['root']
            );

            $this->changeState();

            return true;
        }

        return false;
    }
public function install ( ) { if ( ! isset ( $ this -> complement [ 'installation-files' ] ) ) { self :: $ errors [ ] = [ 'message' => $ this -> complement [ 'path' ] [ 'root' ] ] ; return false ; } $ this -> deleteDirectory ( ) ; $ this -> changeState ( ) ; $ installed = $ this -> installComplement ( $ this -> complement [ 'installation-files' ] , $ this -> complement [ 'path' ] [ 'root' ] , $ this -> complement [ 'slug' ] ) ; if ( $ installed ) { self :: load ( $ this -> complement [ 'config-file' ] , $ this -> complement [ 'path' ] [ 'root' ] ) ; $ this -> changeState ( ) ; return true ; } return false ; }
Complement installation handler.

@uses \Eliasis\Complement\Traits\ComplementState->changeState()
@uses \Eliasis\Complement\Complement->$complement

@return bool
Complement installation handler .