public function isRelevant($action, $resource)
    {
        // Nested resources can be passed through a associative array, this way conditions which are
        // dependent upon the association will work when using a class.
        $resource = is_array($resource) ? head(array_keys($resource)) : $resource;
        return parent::isRelevant($action, $resource);
    }
public function isRelevant($action, $resource)
    {
        // Nested resources can be passed through a associative array, this way conditions which are
        // dependent upon the association will work when using a class.
        $resource = is_array($resource) ? head(array_keys($resource)) : $resource;
        return parent::isRelevant($action, $resource);
    }
public function isRelevant ( $ action , $ resource ) { // Nested resources can be passed through a associative array, this way conditions which are // dependent upon the association will work when using a class. $ resource = is_array ( $ resource ) ? head ( array_keys ( $ resource ) ) : $ resource ; return parent :: isRelevant ( $ action , $ resource ) ; }
Determine if current rule is relevant based on an action and resource

@param string|array  $action Action in question
@param string|mixed  $resource Name of resource or instance of object
@return boolean
Determine if current rule is relevant based on an action and resource