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;
    }