: 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\View\Html;
class Devices extends AbstractFieldHidden {
private $values = array();
protected function fetchElement() {
$html = Html::tag('div', array(
'class' => 'n2_field_radio_icon'
), $this->generateOptions());
Js::addInline('new _N2.FormElementDevices("' . $this->fieldID . '", ' . json_encode($this->values) . ');');
function generateOptions() {
'desktop-portrait' => 'ssi_16 ssi_16--desktopportrait',
'tablet-portrait' => 'ssi_16 ssi_16--tabletportrait',
'mobile-portrait' => 'ssi_16 ssi_16--mobileportrait'
foreach ($options as $value => $class) {
$this->values[] = $value;
$html .= Html::tag('div', array(
'class' => 'n2_field_radio__option'
)) . Html::tag('input', array(
'id' => $this->fieldID . '-' . $value