src/Charcoal/Admin/Template/ElfinderTemplate.php
protected function setDataFromRequest(RequestInterface $request)
    {
        $keys = $this->validDataFromRequest();
        $data = $request->getParams($keys);

        if (isset($data['obj_type'])) {
            $this->objType = filter_var($data['obj_type'], FILTER_SANITIZE_STRING);
        }

        if (isset($data['obj_id'])) {
            $this->objId = filter_var($data['obj_id'], FILTER_SANITIZE_STRING);
        }

        if (isset($data['property'])) {
            $this->propertyIdent = filter_var($data['property'], FILTER_SANITIZE_STRING);
        }

        if (isset($data['assets'])) {
            $this->showAssets = !!$data['assets'];
        }

        if (isset($data['callback'])) {
            $this->callbackIdent = filter_var($data['callback'], FILTER_SANITIZE_STRING);
        }

        if (isset($this->elfinderConfig['translations'])) {
            $this->setLocalizations(array_replace_recursive(
                $this->defaultLocalizations(),
                $this->elfinderConfig['translations']
            ));
        }

        return true;
    }
protected function setDataFromRequest(RequestInterface $request)
    {
        $keys = $this->validDataFromRequest();
        $data = $request->getParams($keys);

        if (isset($data['obj_type'])) {
            $this->objType = filter_var($data['obj_type'], FILTER_SANITIZE_STRING);
        }

        if (isset($data['obj_id'])) {
            $this->objId = filter_var($data['obj_id'], FILTER_SANITIZE_STRING);
        }

        if (isset($data['property'])) {
            $this->propertyIdent = filter_var($data['property'], FILTER_SANITIZE_STRING);
        }

        if (isset($data['assets'])) {
            $this->showAssets = !!$data['assets'];
        }

        if (isset($data['callback'])) {
            $this->callbackIdent = filter_var($data['callback'], FILTER_SANITIZE_STRING);
        }

        if (isset($this->elfinderConfig['translations'])) {
            $this->setLocalizations(array_replace_recursive(
                $this->defaultLocalizations(),
                $this->elfinderConfig['translations']
            ));
        }

        return true;
    }
protected function setDataFromRequest ( RequestInterface $ request ) { $ keys = $ this -> validDataFromRequest ( ) ; $ data = $ request -> getParams ( $ keys ) ; if ( isset ( $ data [ 'obj_type' ] ) ) { $ this -> objType = filter_var ( $ data [ 'obj_type' ] , FILTER_SANITIZE_STRING ) ; } if ( isset ( $ data [ 'obj_id' ] ) ) { $ this -> objId = filter_var ( $ data [ 'obj_id' ] , FILTER_SANITIZE_STRING ) ; } if ( isset ( $ data [ 'property' ] ) ) { $ this -> propertyIdent = filter_var ( $ data [ 'property' ] , FILTER_SANITIZE_STRING ) ; } if ( isset ( $ data [ 'assets' ] ) ) { $ this -> showAssets = ! ! $ data [ 'assets' ] ; } if ( isset ( $ data [ 'callback' ] ) ) { $ this -> callbackIdent = filter_var ( $ data [ 'callback' ] , FILTER_SANITIZE_STRING ) ; } if ( isset ( $ this -> elfinderConfig [ 'translations' ] ) ) { $ this -> setLocalizations ( array_replace_recursive ( $ this -> defaultLocalizations ( ) , $ this -> elfinderConfig [ 'translations' ] ) ) ; } return true ; }
Sets the template data from a PSR Request object.

@param  RequestInterface $request A PSR-7 compatible Request instance.
@return self
Sets the template data from a PSR Request object .