public static function createObject($class, $blockId, $id, $context, $pageObject = null)
    {
        if (!class_exists($class)) {
            return false;
        }
        
        $object = Yii::createObject([
            'class' => $class,
        ]);
        
        $object->setEnvOption('id', $id);
        $object->setEnvOption('blockId', $blockId);
        $object->setEnvOption('context', $context);
        $object->setEnvOption('pageObject', $pageObject);
        
        return $object;
    }
public static function createObject($class, $blockId, $id, $context, $pageObject = null)
    {
        if (!class_exists($class)) {
            return false;
        }
        
        $object = Yii::createObject([
            'class' => $class,
        ]);
        
        $object->setEnvOption('id', $id);
        $object->setEnvOption('blockId', $blockId);
        $object->setEnvOption('context', $context);
        $object->setEnvOption('pageObject', $pageObject);
        
        return $object;
    }
public static function createObject ( $ class , $ blockId , $ id , $ context , $ pageObject = null ) { if ( ! class_exists ( $ class ) ) { return false ; } $ object = Yii :: createObject ( [ 'class' => $ class , ] ) ; $ object -> setEnvOption ( 'id' , $ id ) ; $ object -> setEnvOption ( 'blockId' , $ blockId ) ; $ object -> setEnvOption ( 'context' , $ context ) ; $ object -> setEnvOption ( 'pageObject' , $ pageObject ) ; return $ object ; }
Creates the block object and stores the object within a static block container.

@param string $class
@param integer $blockId The id of the cms_block table
@param integer $id The context id, for example the id of the text block element
@param string $context admin or frontend
@param mixed $pageObject
@return \luya\cms\base\BlockInterface
Creates the block object and stores the object within a static block container .