Skip to content

Commit

Permalink
Add composer.json file
Browse files Browse the repository at this point in the history
  • Loading branch information
Fl0Cri committed Sep 8, 2022
1 parent 0956edb commit ab7dcd1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ListSwitchField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Backend\Classes\ListColumn;
use Lang;
use Model;
use October\Rain\Database\Model;

class ListSwitchField
{
Expand Down Expand Up @@ -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();
Expand All @@ -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;
Expand Down Expand Up @@ -134,4 +134,4 @@ public function getButtonTitle()
{
return Lang::get($this->getConfig($this->value ? 'titleTrue' : 'titleFalse'));
}
}
}
9 changes: 9 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
3 changes: 3 additions & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ab7dcd1

Please sign in to comment.