public function extractData(Request $request)
    {
        $data = $request->data();
        $entityData = array();
        $inputName = $this->getInputName();

        if (!array_key_exists($inputName, $data)) {
            return array();
        }

        $entityData = $data[$inputName];
        $filteredData = array();

        foreach ($this->getAttributeNames() as $key) {
            if (array_key_exists($key, $entityData)) {
                $filteredData[$key] = $entityData[$key];
            }
        }

        return $filteredData;
    }
public function extractData(Request $request)
    {
        $data = $request->data();
        $entityData = array();
        $inputName = $this->getInputName();

        if (!array_key_exists($inputName, $data)) {
            return array();
        }

        $entityData = $data[$inputName];
        $filteredData = array();

        foreach ($this->getAttributeNames() as $key) {
            if (array_key_exists($key, $entityData)) {
                $filteredData[$key] = $entityData[$key];
            }
        }

        return $filteredData;
    }
public function extractData ( Request $ request ) { $ data = $ request -> data ( ) ; $ entityData = array ( ) ; $ inputName = $ this -> getInputName ( ) ; if ( ! array_key_exists ( $ inputName , $ data ) ) { return array ( ) ; } $ entityData = $ data [ $ inputName ] ; $ filteredData = array ( ) ; foreach ( $ this -> getAttributeNames ( ) as $ key ) { if ( array_key_exists ( $ key , $ entityData ) ) { $ filteredData [ $ key ] = $ entityData [ $ key ] ; } } return $ filteredData ; }
Extracts the request values related to the entity
from a supplied request object.
@param  Request $request
@return array
Extracts the request values related to the entity from a supplied request object .