/** * @param \Nette\Forms\IControl|\Nette\Forms\Controls\BaseControl $control * * @return object */ protected function getControlEntityClass(Nette\Forms\IControl $control) { foreach ($this->entities as $entity) { if ($this->entities->getInfo() === $control->getParent()) { return $this->getTargetClassName($entity, $this->getControlField($control)); } } return NULL; }