src/controllers/EntityManageController.php
public function actionGetContextId()
    {
        if (false === Yii::$app->request->isAjax) {
            throw new NotFoundHttpException(
                Yii::t('dotplant.entity.structure', 'Page not found')
            );
        }
        Yii::$app->response->format = Response::FORMAT_JSON;
        $structureId = Yii::$app->request->post('structure_id');
        return BaseStructure::find()->select('context_id')->where(['id' => $structureId])->scalar();
    }
public function actionGetContextId()
    {
        if (false === Yii::$app->request->isAjax) {
            throw new NotFoundHttpException(
                Yii::t('dotplant.entity.structure', 'Page not found')
            );
        }
        Yii::$app->response->format = Response::FORMAT_JSON;
        $structureId = Yii::$app->request->post('structure_id');
        return BaseStructure::find()->select('context_id')->where(['id' => $structureId])->scalar();
    }
public function actionGetContextId ( ) { if ( false === Yii :: $ app -> request -> isAjax ) { throw new NotFoundHttpException ( Yii :: t ( 'dotplant.entity.structure' , 'Page not found' ) ) ; } Yii :: $ app -> response -> format = Response :: FORMAT_JSON ; $ structureId = Yii :: $ app -> request -> post ( 'structure_id' ) ; return BaseStructure :: find ( ) -> select ( 'context_id' ) -> where ( [ 'id' => $ structureId ] ) -> scalar ( ) ; }
Returns context_id according to given Entity id

@return false|null|string
@throws NotFoundHttpException
Returns context_id according to given Entity id