mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-01 20:43:52 +01:00
Use OptionsBuilder in all mapper classes.
This commit is contained in:
@@ -56,90 +56,6 @@ abstract class AbstractMapper implements Mapper
|
||||
$this->initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a option mapping.
|
||||
*
|
||||
* @param string $option Name of the option.
|
||||
* @param string $mapping Mapping column name. Set if column name differs.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function addOption($option, $mapping = null)
|
||||
{
|
||||
trigger_error(
|
||||
__METHOD__ . ' is deprecated. Use $this->optionsBuilder->' . __FUNCTION__ . '()',
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
|
||||
$this->optionsBuilder->addOption($option, $mapping);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add options mapping.
|
||||
*
|
||||
* @param array|mixed $options List of option names.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function addOptions($options)
|
||||
{
|
||||
trigger_error(
|
||||
__METHOD__ . ' is deprecated. Use $this->optionsBuilder->' . __FUNCTION__ . '()',
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
|
||||
$arguments = func_get_args();
|
||||
|
||||
$this->optionsBuilder->addOptions($arguments);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a conditional option.
|
||||
*
|
||||
* @param string $column Condition column.
|
||||
* @param string $option Option name.
|
||||
* @param null $mapping Mapping column name.
|
||||
* @param mixed $value Value of the conditional column.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function addConditionalOption($column, $option = null, $mapping = null, $value = self::VALUE_NOT_EMPTY)
|
||||
{
|
||||
trigger_error(
|
||||
__METHOD__ . ' is deprecated. Use $this->optionsBuilder->' . __FUNCTION__ . '()',
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
|
||||
$this->optionsBuilder->addConditionalOption($column, $option, $mapping, $value);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a conditional options.
|
||||
*
|
||||
* @param string $column Condition column.
|
||||
* @param array $options Option names.
|
||||
* @param mixed $value Value of the conditional column.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function addConditionalOptions($column, array $options, $value = self::VALUE_NOT_EMPTY)
|
||||
{
|
||||
trigger_error(
|
||||
__METHOD__ . ' is deprecated. Use $this->optionsBuilder->' . __FUNCTION__ . '()',
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
|
||||
$this->optionsBuilder->addConditionalOptions($column, $options, $value);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user