/** * Whether the resource is enabled or not. * * @param ResourceInterface $resource * * @return bool */ public function enabled(ResourceInterface $resource) { return $resource->exists() && $resource instanceof DirectoryResource; }
/** * Finds a configuration. * * @return ConfigurationInterface */ public function find(ResourceInterface $resource) { return $resource->getConfiguration() ?: $this->findInitialized(); }
/** * Whether the resource is enabled or not. * * @param ResourceInterface $resource * * @return bool */ public function enabled(ResourceInterface $resource) { return $resource->exists() && $this->isFileResource($resource); }