Skip to content
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

Closed
wants to merge 72 commits into from
Closed

refactored pagelock module to 2.0 style #2850

wants to merge 72 commits into from

Conversation

Guite
Copy link
Member

@Guite Guite commented Apr 19, 2016

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets -
Refs tickets #1753
License MIT
Changelog updated yes

Description

This PR updates the pagelock module to new controller, Twig, etc.

@Guite Guite added this to the 1.4.3 milestone Apr 19, 2016
@craigh craigh mentioned this pull request Apr 19, 2016
25 tasks
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'));
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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'

@Guite
Copy link
Member Author

Guite commented Apr 20, 2016

added several changes


PageUtil::addVar('header', $html);
PageUtil::addVar('footer', $lockedHtml);
$this->footerAssetBag->add($lockedHtml);
Copy link
Member

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?

@craigh
Copy link
Member

craigh commented Apr 20, 2016

Would you please add some documentation for the page lock api and usage. Also please add to changelog.

craigh and others added 27 commits April 25, 2016 10:00
| Q                 | A
| ----------------- | ---
| Bug fix?          | no
| New feature?      | no
| BC breaks?        | no
| Deprecations?     | no
| Fixed tickets     | -
| Refs tickets      | #2034, #1753
| License           | MIT
| Changelog updated | yes
  - 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
@Guite
Copy link
Member Author

Guite commented Apr 25, 2016

Closed in favour of #2862

@Guite Guite closed this Apr 25, 2016
@Guite Guite deleted the pagelock branch April 25, 2016 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants