src/Charcoal/Admin/Widget/FormPropertyWidget.php
public function widgetId()
    {
        if (!$this->widgetId) {
            $type = $this->type();
            switch ($type) {
                case static::PROPERTY_DISPLAY:
                    $id = $this->display()->displayId();
                    break;

                case static::PROPERTY_CONTROL:
                    $id = $this->input()->inputId();
                    break;

                default:
                    $id = 'widget_'.uniqid();
                    break;
            }

            $this->widgetId = $id;
        }

        return $this->widgetId;
    }
public function widgetId()
    {
        if (!$this->widgetId) {
            $type = $this->type();
            switch ($type) {
                case static::PROPERTY_DISPLAY:
                    $id = $this->display()->displayId();
                    break;

                case static::PROPERTY_CONTROL:
                    $id = $this->input()->inputId();
                    break;

                default:
                    $id = 'widget_'.uniqid();
                    break;
            }

            $this->widgetId = $id;
        }

        return $this->widgetId;
    }
public function widgetId ( ) { if ( ! $ this -> widgetId ) { $ type = $ this -> type ( ) ; switch ( $ type ) { case static :: PROPERTY_DISPLAY : $ id = $ this -> display ( ) -> displayId ( ) ; break ; case static :: PROPERTY_CONTROL : $ id = $ this -> input ( ) -> inputId ( ) ; break ; default : $ id = 'widget_' . uniqid ( ) ; break ; } $ this -> widgetId = $ id ; } return $ this -> widgetId ; }
Retrieve the widget ID.

@return string
Retrieve the widget ID .