-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CMS PHP BLOCK] Remove view massiv assignment #1058
Comments
In order to dirty fix your php block view, insert the following code at the top of your php view file: // <!-- RC2 UPDATE FIX!
$vars = $this->context->getVarValues();
$cfgs = $this->context->getCfgValues();
$extras = $this->context->getExtraVarValues();
$placeholders = $this->context->getPlaceholderValues();
// --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to not overload the view files of blocks and reduce ram usage the contents of block configs should be requested instead of massiv assigned to the view. This will also fixed the problem to make sure if variables exists with isset() method and allows to define default values if not existing.
Old:
new:
BC Breaking
The following variables will be removed in the view files by default:
$vars['foo']
, use$this->varValue('foo')
instead.$cfgs['foo']
, use$this->cfgValue('foo')
instead.$placeholders['foo']
, use$this->placeholderValue('foo')
instead.$extras['foo']
, use$this->extraValue('foo')
instead.The text was updated successfully, but these errors were encountered: