/** * Loads the resource and store it in the $_pluginResources attribute. * * Ensures that the resource will be lazy loaded if the lazyLoad option * evaluates to true. * * @param string $resource * @param array|object|null $options The resource options. * @return string|boolean The name of the resource or false if it was not found. */ protected function _loadPluginResource($resource, $options) { $options = (array) $options; $lazyLoad = false; if (isset($options['lazyLoad'])) { $lazyLoad = $options['lazyLoad']; // Do not pass the lazyLoad option to the resource // to be as transparent as possible. unset($options['lazyLoad']); } $name = parent::_loadPluginResource($resource, $options); if ($name === false) { // Resource was not found. return false; } if ($lazyLoad) { $this->forceLazyLoad($name); } return $name; }