public function setForm($formOrContainer)
    {
        if (!$formOrContainer instanceof FormInterface
            && !$formOrContainer instanceof Container
        ) {
            throw new \InvalidArgumentException('Parameter must be either of type "\Zend\Form\FormInterface" or "\Core\Form\Container"');
        }

        $this->form = $formOrContainer;
        $this->generateCheckboxes();

        return $this;
    }