yii\base\Widget::getId PHP 메소드

getId() 공개 메소드

Returns the ID of the widget.
public getId ( boolean $autoGenerate = true ) : string
$autoGenerate boolean whether to generate an ID if it is not set previously
리턴 string ID of the widget.
    public function getId($autoGenerate = true)
    {
        if ($autoGenerate && $this->_id === null) {
            $this->_id = static::$autoIdPrefix . static::$counter++;
        }
        return $this->_id;
    }