protected function getComponentId($object)
    {
        /** @var Application $app */
        $app = Yii::$app->getApplication();
        $components = $app->getComponents(false);
        foreach ($components as $id => $component) {
            if($object === $component){
                return $id;
            }
        }
        return false;
    }
protected function getComponentId($object)
    {
        /** @var Application $app */
        $app = Yii::$app->getApplication();
        $components = $app->getComponents(false);
        foreach ($components as $id => $component) {
            if($object === $component){
                return $id;
            }
        }
        return false;
    }
protected function getComponentId ( $ object ) { /** @var Application $app */ $ app = Yii :: $ app -> getApplication ( ) ; $ components = $ app -> getComponents ( false ) ; foreach ( $ components as $ id => $ component ) { if ( $ object === $ component ) { return $ id ; } } return false ; }
find the Component Id
@param \yii\base\Object $object
@return bool|int|string
find the Component Id