Skip to content

Commit

Permalink
Added support for bearframework/bearframework v0.11 and bearcms/bearf…
Browse files Browse the repository at this point in the history
…ramework-addon v0.7.
  • Loading branch information
ivopetkov committed Feb 18, 2019
1 parent 51af139 commit ab1e2cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/embedElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use BearFramework\App;

$app = App::get();
$context = $app->context->get(__FILE__);
$context = $app->contexts->get(__FILE__);

$allowedHosts = [
'skydrive.live.com',
Expand Down Expand Up @@ -136,7 +136,7 @@
?><html>
<head>
<style id="responsively-lazy-style">.responsively-lazy:not(img){position:relative;height:0;}.responsively-lazy:not(img)>img{position:absolute;top:0;left:0;width:100%;height:100%}img.responsively-lazy{width:100%;}</style>
<script id="responsively-lazy-script" src="<?= $context->assets->getUrl('assets/responsivelyLazy.min.js', ['cacheMaxAge' => 999999999, 'version' => 2]) ?>" async/>
<script id="responsively-lazy-script" src="<?= $context->assets->getURL('assets/responsivelyLazy.min.js', ['cacheMaxAge' => 999999999, 'version' => 2]) ?>" async/>
</head>
<body><?= $content ?></body>
</html>
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
],
"require": {
"php": ">=7.1",
"bearcms/bearframework-addon": "^0.6.2",
"bearcms/bearframework-addon": "0.7.*",
"bearframework/localization-addon": "0.2.*",
"ivopetkov/html5-dom-document-php": "0.6.*|1.*"
"ivopetkov/html5-dom-document-php": "2.*"
},
"autoload": {
"files": ["autoload.php"]
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
$app = App::get();

$app->bearCMS->addons
->announce('bearcms/embed-element-addon', function(\BearCMS\Addons\Addon $addon) use ($app) {
->register('bearcms/embed-element-addon', function(\BearCMS\Addons\Addon $addon) use ($app) {
$addon->initialize = function() use ($app) {
$context = $app->context->get(__FILE__);
$context = $app->contexts->get(__FILE__);

$context->assets->addDir('assets');

Expand Down

0 comments on commit ab1e2cc

Please sign in to comment.