Skip to content

Commit b673e6f

Browse files
committed
* Craft 3 beta 20 compatibility
1 parent fa4badb commit b673e6f

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Transcoder Changelog
22

3+
## 1.0.6 - 2017.07.15
4+
### Changed
5+
* Craft 3 beta 20 compatibility
6+
37
## 1.0.5 - 2017.03.24
48
### Changed
59
* `hasSettings` -> `hasCpSettings` for Craft 3 beta 8 compatibility

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The Transcoder License
1+
Transcoder License
22
Copyright (c) 2017 nystudio107
33

44
Permission is hereby granted, free of charge, to any person or entity obtaining a copy of this software and associated documentation files (the "Software"), to use the software in any capacity, including commercial and for-profit use. Permission is also granted to alter, modify, or extend the Software for your own use, or commission a third-party to perform modifications for you.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Related: [Transcoder for Craft 2.x](https://github.com/nystudio107/transcoder)
88

99
To install Transcoder, follow these steps:
1010

11-
1. Install with Composer via `composer require nystudio107/craft3-transcoder`
11+
1. Install with Composer via `composer require nystudio107/craft3-transcoder` from your project directory
1212
2. Install plugin in the Craft Control Panel under Settings > Plugins
1313

1414
Transcoder works on Craft 3.x.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nystudio107/craft3-transcoder",
33
"description": "Transcode video & audio files to various formats, and provide video thumbnails",
44
"type": "craft-plugin",
5-
"version": "1.0.5",
5+
"version": "1.0.6",
66
"keywords": [
77
"craft",
88
"cms",

src/Transcoder.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616

1717
use Craft;
1818
use craft\base\Plugin;
19+
use craft\console\Application as ConsoleApplication;
20+
use craft\events\DefineComponentsEvent;
1921
use craft\events\RegisterCacheOptionsEvent;
2022
use craft\utilities\ClearCaches;
21-
use craft\console\Application as ConsoleApplication;
23+
use craft\web\twig\variables\CraftVariable;
2224

2325
use yii\base\Event;
2426

@@ -52,6 +54,14 @@ public function init()
5254
parent::init();
5355
self::$plugin = $this;
5456

57+
Event::on(
58+
CraftVariable::class,
59+
CraftVariable::EVENT_DEFINE_COMPONENTS,
60+
function (DefineComponentsEvent $event) {
61+
$event->components['transcoder'] = TranscoderVariable::class;
62+
}
63+
);
64+
5565
// Handle console commands
5666
if (Craft::$app instanceof ConsoleApplication) {
5767
$this->controllerNamespace = 'nystudio107\transcoder\console\controllers';
@@ -80,14 +90,6 @@ function (RegisterCacheOptionsEvent $event) {
8090
);
8191
}
8292

83-
/**
84-
* @inheritdoc
85-
*/
86-
public function defineTemplateComponent()
87-
{
88-
return TranscoderVariable::class;
89-
}
90-
9193
// Protected Methods
9294
// =========================================================================
9395

0 commit comments

Comments
 (0)