private static function installRequest($isUpdate = false)
    {
        self::$id = self::$config['id'];

        $that = self::getInstance();

        $that->install();

        $that->setState($isUpdate ? 'active' : 'inactive');

        $complements = self::getList(self::$config['filter'], self::$config['sort']);

        $complement = $complements[self::$id];

        $response = [
            'complement' => $complement,
            'errors' => self::$errors,
        ];

        echo json_encode($response);
    }
private static function installRequest($isUpdate = false)
    {
        self::$id = self::$config['id'];

        $that = self::getInstance();

        $that->install();

        $that->setState($isUpdate ? 'active' : 'inactive');

        $complements = self::getList(self::$config['filter'], self::$config['sort']);

        $complement = $complements[self::$id];

        $response = [
            'complement' => $complement,
            'errors' => self::$errors,
        ];

        echo json_encode($response);
    }
private static function installRequest ( $ isUpdate = false ) { self :: $ id = self :: $ config [ 'id' ] ; $ that = self :: getInstance ( ) ; $ that -> install ( ) ; $ that -> setState ( $ isUpdate ? 'active' : 'inactive' ) ; $ complements = self :: getList ( self :: $ config [ 'filter' ] , self :: $ config [ 'sort' ] ) ; $ complement = $ complements [ self :: $ id ] ; $ response = [ 'complement' => $ complement , 'errors' => self :: $ errors , ] ; echo json_encode ( $ response ) ; }
Install request.

@param string $isUpdate → if it is an update

@uses \Eliasis\Complement\Complement::getInstance()
@uses \Eliasis\Complement\Traits\ComplementImport->install()
@uses \Eliasis\Complement\Complement::$errors
Install request .