: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace Nextend\Framework\Form;
use Nextend\Framework\Form\Insert\AbstractInsert;
class ContainerGeneral extends AbstractContainer {
* @var ContainerInterface
* @param ContainerInterface|AbstractInsert $insertAt
* @param boolean|string $label
* @param array $parameters
public function __construct($insertAt, $name, $label = false, $parameters = array()) {
if ($insertAt instanceof ContainerInterface) {
$this->parent = $insertAt;
$this->parent->addElement($this);
} else if ($insertAt instanceof AbstractInsert) {
$this->parent = $insertAt->insert($this);
$this->controlName = $this->parent->getControlName();
foreach ($parameters as $option => $value) {
$option = 'set' . $option;
$this->{$option}($value);
public function removeElement($element) {
$previous = $element->getPrevious();
$next = $element->getNext();
if ($this->first === $element) {
if ($this->last === $element) {
$previous->setNext($next);
* @return ContainerInterface
public function getParent() {
public function getPath() {
return $this->parent->getPath() . '/' . $this->name;
public function setClass($class) {
public function hasLabel() {
return !empty($this->label);
public function getLabel() {
public function getName() {
public function getForm() {
return $this->parent->getForm();
public function getControlName() {
return $this->controlName;
* @param string $controlName
public function setControlName($controlName) {
$this->controlName = $controlName;