/**
  * Return the state's name.
  *
  * @return null|string
  */
 public function name()
 {
     if (!($iso = $this->object->getValue())) {
         return null;
     }
     return array_get($this->object->getOptions(), $iso);
 }
Exemplo n.º 2
0
 /**
  * Handle the command.
  *
  * @param Container $container
  */
 public function handle(Container $container)
 {
     $container->call(array_get($this->fieldType->getConfig(), 'handler'), ['fieldType' => $this->fieldType]);
 }
 /**
  * Handle the options.
  *
  * @param StateFieldType $fieldType
  * @param Repository     $config
  */
 public function handle(StateFieldType $fieldType, Repository $config)
 {
     $fieldType->setOptions($config->get('anomaly.field_type.state::states/' . array_get($fieldType->getConfig(), 'country')));
 }