private function getResourceData($resource)
    {
        $data = false;
        if(!is_null($resource) && $resource->exists()) {
            $resourceTypes = array_keys($resource->getTypes());
            $data = [
                'uri'        => $resource->getUri(),
                'classUri'   => $resourceTypes[0],
                'label'      => $resource->getLabel(),
                'type'       => 'instance'
            ];
        }
        return $data;
    }
private function getResourceData($resource)
    {
        $data = false;
        if(!is_null($resource) && $resource->exists()) {
            $resourceTypes = array_keys($resource->getTypes());
            $data = [
                'uri'        => $resource->getUri(),
                'classUri'   => $resourceTypes[0],
                'label'      => $resource->getLabel(),
                'type'       => 'instance'
            ];
        }
        return $data;
    }
private function getResourceData ( $ resource ) { $ data = false ; if ( ! is_null ( $ resource ) && $ resource -> exists ( ) ) { $ resourceTypes = array_keys ( $ resource -> getTypes ( ) ) ; $ data = [ 'uri' => $ resource -> getUri ( ) , 'classUri' => $ resourceTypes [ 0 ] , 'label' => $ resource -> getLabel ( ) , 'type' => 'instance' ] ; } return $ data ; }
Preparing resource to be used in the ListLookup
@param $resource
@return array|bool
Preparing resource to be used in the ListLookup