-
Notifications
You must be signed in to change notification settings - Fork 69
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
refactored pagelock module to 2.0 style #2850
Conversation
if (!empty($lockName) || !$ignoreEmptyLock) { | ||
PageUtil::addVar('javascript', 'zikula.ui'); | ||
PageUtil::addVar('javascript', 'system/PageLockModule/Resources/public/js/PageLock.js'); | ||
PageUtil::addVar('stylesheet', \ThemeUtil::getModuleStylesheet('ZikulaPageLockModule')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not correct. please refactor to user zasset('ZikulaPageLockModule:js/PageLock.js') and
...:css/admin.css` -although the latter may not be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arghh - I just realized you are using PageUtil! this must go - use asset service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use one of the following:
if ('stylesheet' == $type) {
$this->container->get('zikula_core.common.theme.assets_css')->add([$value => $weight]);
} elseif ('javascript' == $type) {
$this->container->get('zikula_core.common.theme.assets_js')->add([$value => $weight]);
} elseif ('header' == $type) {
$this->container->get('zikula_core.common.theme.assets_header')->add([$value => $weight]);
} elseif ('footer' == $type) {
$this->container->get('zikula_core.common.theme.assets_footer')->add([$value => $weight]);
}
For the $value
you can use
$value = $this->container->get('zikula_core.common.theme.asset_helper')->resolve($path);
$path
would be something like 'ZikulaPageLockModule:js/PageLock.js'
added several changes |
|
||
PageUtil::addVar('header', $html); | ||
PageUtil::addVar('footer', $lockedHtml); | ||
$this->footerAssetBag->add($lockedHtml); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may be the first test of this 😄 does it work?
Would you please add some documentation for the page lock api and usage. Also please add to changelog. |
…d access to user-related functions.
- Removing nikic/php-parser (v1.4.1) - Installing nikic/php-parser (v2.0.1) - Removing jms/translation-bundle (1.2.1) - Installing jms/translation-bundle (1.2.2) - Removing monolog/monolog (1.18.1) - Installing monolog/monolog (1.18.2) - Updating ezyang/htmlpurifier dev-master (096064d => 2e15d7a) Checking out 2e15d7a4dadb08ccdac3f060dcf81112e607b6c4
- Removing composer/installers (v1.0.23) - Installing composer/installers (v1.0.24) - Removing nikic/php-parser (v2.0.1) - Installing nikic/php-parser (v1.4.1)
* update form extensions to Sy2.8 and add a few features @Guite 😄 * update changelog
* support multiple help elements * Check for empty help values
… alert text feature. @Guite
Closed in favour of #2862 |
Description
This PR updates the pagelock module to new controller, Twig, etc.