/** * Retrieve the default elFinder Connector options. * * @link https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options * Documentation for connector options. * @example https://gist.github.com/mcaskill/5944478b1894a5bf1349bfa699387cd4 * The Connector can be customized by defining a "elfinder" structure in * your application's admin configuration. * * @param array|null $extraOptions Additional settings to pass to elFinder. * @return array */ public function connectorOptions(array $extraOptions = []) { if ($this->elfinderOptions === null || $extraOptions) { $options = $this->defaultConnectorOptions(); if (isset($this->elfinderConfig['connector'])) { $options = array_replace_recursive($options, $this->elfinderConfig['connector'], $extraOptions); } else { /** @todo Remove this deprecation notice for the next release */ $keys = $this->elfinderConfig->keys(); if ($keys && array_intersect(['bind', 'plugin', 'roots'], $keys)) { trigger_error('elFinder connector settings must be nested under [admin.elfinder.connector].', E_USER_DEPRECATED); } } if ($extraOptions) { $options = array_replace_recursive($options, $extraOptions); } if (isset($options['bind'])) { $options['bind'] = $this->resolveBoundCallbacks($options['bind']); } $this->elfinderOptions = $options; } return $this->elfinderOptions; }