public function registr($place, $controller)
    {
        if (preg_match('/^[a-z0-9]+:[a-z0-9]+:[_a-z0-9]+$/i', $controller)) {
            if (!isset($this->widgets[$place])) {
                $this->widgets[$place][] = $controller;
            } elseif (!in_array($controller, $this->widgets[$place])) {
                $this->widgets[$place][] = $controller;
            }

            return true;
        }

        return false;
    }
public function registr($place, $controller)
    {
        if (preg_match('/^[a-z0-9]+:[a-z0-9]+:[_a-z0-9]+$/i', $controller)) {
            if (!isset($this->widgets[$place])) {
                $this->widgets[$place][] = $controller;
            } elseif (!in_array($controller, $this->widgets[$place])) {
                $this->widgets[$place][] = $controller;
            }

            return true;
        }

        return false;
    }
public function registr ( $ place , $ controller ) { if ( preg_match ( '/^[a-z0-9]+:[a-z0-9]+:[_a-z0-9]+$/i' , $ controller ) ) { if ( ! isset ( $ this -> widgets [ $ place ] ) ) { $ this -> widgets [ $ place ] [ ] = $ controller ; } elseif ( ! in_array ( $ controller , $ this -> widgets [ $ place ] ) ) { $ this -> widgets [ $ place ] [ ] = $ controller ; } return true ; } return false ; }
Regist widget.

Controller example:
AcmeDemoBundle:Welcome:index
AcmeArticleBundle:Article:show

@param string $place
@param string $controller

@return bool
Regist widget .