Prado\Web\UI\TControl::findControl PHP Метод

findControl() публичный Метод

The current naming container is either the control itself if it implements {@link INamingContainer} or the control's naming container. The ID path is an ID sequence separated by {@link TControl::ID_SEPARATOR}. For example, 'Repeater1.Item1.Button1' looks for a control with ID 'Button1' whose naming container is 'Item1' whose naming container is 'Repeater1'.
public findControl ( $id ) : TControl | null
Результат TControl | null the control found, null if not found
    public function findControl($id)
    {
        $id = strtr($id, '.', self::ID_SEPARATOR);
        $container = $this instanceof INamingContainer ? $this : $this->getNamingContainer();
        if (!$container || !$container->getHasControls()) {
            return null;
        }
        if (!isset($container->_rf[self::RF_NAMED_CONTROLS])) {
            $container->_rf[self::RF_NAMED_CONTROLS] = array();
            $container->fillNameTable($container, $container->_rf[self::RF_CONTROLS]);
        }
        if (($pos = strpos($id, self::ID_SEPARATOR)) === false) {
            return isset($container->_rf[self::RF_NAMED_CONTROLS][$id]) ? $container->_rf[self::RF_NAMED_CONTROLS][$id] : null;
        } else {
            $cid = substr($id, 0, $pos);
            $sid = substr($id, $pos + 1);
            if (isset($container->_rf[self::RF_NAMED_CONTROLS][$cid])) {
                return $container->_rf[self::RF_NAMED_CONTROLS][$cid]->findControl($sid);
            } else {
                return null;
            }
        }
    }
TControl