: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace Nextend\Framework\Form\Element;
use Nextend\Framework\Asset\Js\Js;
use Nextend\Framework\Form\AbstractField;
class LayerWindowFocus extends AbstractField {
* LayerWindowFocus constructor.
* @param array $parameters
public function __construct($insertAt, $name, $label, $parameters = array()) {
parent::__construct($insertAt, $name, $label, '', $parameters);
* @param AbstractField $fieldImage
* @param AbstractField $fieldFocusX
* @param AbstractField $fieldFocusY
public function setFields($fieldImage, $fieldFocusX, $fieldFocusY) {
$this->fieldImage = $fieldImage;
$this->fieldFocusX = $fieldFocusX;
$this->fieldFocusY = $fieldFocusY;
protected function fetchElement() {
Js::addInline('new _N2.FormElementLayerWindowFocus("' . $this->fieldID . '", ' . json_encode(array(
'image' => $this->fieldImage->getID(),
'focusX' => $this->fieldFocusX->getID(),
'focusY' => $this->fieldFocusY->getID(),
return '<div id="' . $this->fieldID . '" class="n2_field_layer_window_focus" style="width:314px;"><img class="n2_field_layer_window_focus__image" alt="Error"></div>';