/**
  * Inject dependencies from a DI Container.
  *
  * @param Container $container A dependencies container instance.
  * @return void
  */
 public function setDependencies(Container $container)
 {
     parent::setDependencies($container);
     $appConfig = $container['config'];
     if (isset($appConfig['google.console.api_key'])) {
         $this->setApiKey($appConfig['google.console.api_key']);
     } elseif (isset($appConfig['apis.google.map.key'])) {
         $this->setApiKey($appConfig['apis.google.map.key']);
     }
 }
Пример #2
0
 /**
  * Inject dependencies from a DI Container.
  *
  * @param Container $container A dependencies container instance.
  * @return void
  */
 public function setDependencies(Container $container)
 {
     parent::setDependencies($container);
     $this->baseUrl = $container['base-url'];
 }
Пример #3
0
 /**
  * Retrieve the value for the input form control.
  *
  * Note: line-breaks are automatically removed from the input value.
  *
  * @see    AbstractPropertyInput::inputVal()
  * @return string
  */
 public function inputVal()
 {
     return preg_replace('~[\\n\\r]~', '', parent::inputVal());
 }
 /**
  * @param Container $container Pimple DI container.
  * @return void
  */
 public function setDependencies(Container $container)
 {
     parent::setDependencies($container);
     $this->setPropertyDisplayFactory($container['property/display/factory']);
 }