Skip to content

Commit

Permalink
* Craft 3 beta 20 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jul 15, 2017
1 parent fa4badb commit b673e6f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Transcoder Changelog

## 1.0.6 - 2017.07.15
### Changed
* Craft 3 beta 20 compatibility

## 1.0.5 - 2017.03.24
### Changed
* `hasSettings` -> `hasCpSettings` for Craft 3 beta 8 compatibility
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The Transcoder License
Transcoder License
Copyright (c) 2017 nystudio107

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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Related: [Transcoder for Craft 2.x](https://github.com/nystudio107/transcoder)

To install Transcoder, follow these steps:

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

Transcoder works on Craft 3.x.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft3-transcoder",
"description": "Transcode video & audio files to various formats, and provide video thumbnails",
"type": "craft-plugin",
"version": "1.0.5",
"version": "1.0.6",
"keywords": [
"craft",
"cms",
Expand Down
20 changes: 11 additions & 9 deletions src/Transcoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@

use Craft;
use craft\base\Plugin;
use craft\console\Application as ConsoleApplication;
use craft\events\DefineComponentsEvent;
use craft\events\RegisterCacheOptionsEvent;
use craft\utilities\ClearCaches;
use craft\console\Application as ConsoleApplication;
use craft\web\twig\variables\CraftVariable;

use yii\base\Event;

Expand Down Expand Up @@ -52,6 +54,14 @@ public function init()
parent::init();
self::$plugin = $this;

Event::on(
CraftVariable::class,
CraftVariable::EVENT_DEFINE_COMPONENTS,
function (DefineComponentsEvent $event) {
$event->components['transcoder'] = TranscoderVariable::class;
}
);

// Handle console commands
if (Craft::$app instanceof ConsoleApplication) {
$this->controllerNamespace = 'nystudio107\transcoder\console\controllers';
Expand Down Expand Up @@ -80,14 +90,6 @@ function (RegisterCacheOptionsEvent $event) {
);
}

/**
* @inheritdoc
*/
public function defineTemplateComponent()
{
return TranscoderVariable::class;
}

// Protected Methods
// =========================================================================

Expand Down

0 comments on commit b673e6f

Please sign in to comment.