From ab7dcd145fd66a33492f504542608fbc5cdb6e9e Mon Sep 17 00:00:00 2001 From: Fl0Cri Date: Thu, 8 Sep 2022 11:08:03 +0200 Subject: [PATCH] Add composer.json file --- ListSwitchField.php | 8 ++++---- composer.json | 9 +++++++++ updates/version.yaml | 3 +++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 composer.json diff --git a/ListSwitchField.php b/ListSwitchField.php index f57ba69..86c4960 100644 --- a/ListSwitchField.php +++ b/ListSwitchField.php @@ -2,7 +2,7 @@ use Backend\Classes\ListColumn; use Lang; -use Model; +use October\Rain\Database\Model; class ListSwitchField { @@ -40,7 +40,7 @@ public static function storeFieldConfig($field, array $config) * * @return string HTML */ - public static function render($value, ListColumn $column, Model $record) + public static function render($value, ListColumn $column, $record) { $field = new self($value, $column, $record); $config = $field->getConfig(); @@ -63,7 +63,7 @@ public static function render($value, ListColumn $column, Model $record) * @param ListColumn $column * @param Model $record */ - public function __construct($value, ListColumn $column, Model $record) + public function __construct($value, ListColumn $column, $record) { $this->name = $column->columnName; $this->value = $value; @@ -134,4 +134,4 @@ public function getButtonTitle() { return Lang::get($this->getConfig($this->value ? 'titleTrue' : 'titleFalse')); } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..e9d86f2 --- /dev/null +++ b/composer.json @@ -0,0 +1,9 @@ +{ + "name": "inetis/listswitch-plugin", + "description": "Add the possibility to create buttons in backend lists that toggle a model property.", + "type": "october-plugin", + "licence": "MIT", + "require": { + "composer/installers": "~1.0" + } +} diff --git a/updates/version.yaml b/updates/version.yaml index bb65260..ad8680f 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -5,3 +5,6 @@ 1.0.3: - Preserve column configs - Add Russian translation +1.0.4: + - Add a composer.json file + - Use weaker typing to prevent compatibility issues when mixing Model facades