Skip to content

Commit

Permalink
Merge pull request #4 from GawainLynch/hotfix/updates
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
rossriley committed Feb 9, 2016
2 parents 3649031 + d908e13 commit 00d2588
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 88 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
### Colourpicker Extension for Bolt
### ColourPicker Extension for Bolt

21 changes: 13 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,30 @@
"description": "An extension to add a colourpicker as a field type within Bolt",
"type": "bolt-extension",
"require": {
"bolt/bolt": ">3.0,<4.0"
"bolt/bolt": "^3.0"
},
"license": "MIT",
"authors": [{"name": "Ross Riley", "email": "[email protected]"}
"authors": [
{
"name": "Ross Riley",
"email": "[email protected]"
}
],
"keywords": [
"backend", "field", "colourpicker"
"backend",
"field",
"colourpicker"
],
"minimum-stability":"dev",
"prefer-stable":true,
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Bolt\\Extensions\\Bolt\\Colourpicker\\": "src"
"Bolt\\Extensions\\Bolt\\ColourPicker\\": "src"
}
},

"extra": {
"bolt-class": "Bolt\\Extensions\\Bolt\\Colourpicker\\Extension",
"bolt-assets": "assets",
"bolt-class": "Bolt\\Extensions\\Bolt\\ColourPicker\\ColourPickerExtension",
"bolt-screenshots": [
"screenshot.png"
]
Expand Down
34 changes: 34 additions & 0 deletions src/ColourPickerExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Bolt\Extensions\Bolt\ColourPicker;

use Bolt\Asset\File\JavaScript;
use Bolt\Asset\File\Stylesheet;
use Bolt\Extension\SimpleExtension;
use Bolt\Extensions\Bolt\ColourPicker\Field\ColourPickField;

class ColourPickerExtension extends SimpleExtension
{
protected function registerFields()
{
return [
new ColourPickField(),
];
}

protected function registerTwigPaths()
{
return [
'templates' => ['position' => 'prepend', 'namespace' => 'bolt'],
];
}

protected function registerAssets()
{
return [
new Stylesheet('colourpicker.css'),
new JavaScript('colourpicker.js'),
new JavaScript('start.js'),
];
}
}
37 changes: 0 additions & 37 deletions src/Extension.php

This file was deleted.

12 changes: 6 additions & 6 deletions src/Field/ColourPickField.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?php

namespace Bolt\Extensions\Bolt\Colourpicker\Field;
namespace Bolt\Extensions\Bolt\ColourPicker\Field;

use Bolt\Field\FieldInterface;
use Bolt\Storage\Field\FieldInterface;

class ColourPickField implements FieldInterface
{
public function getName()
{
return 'colourpicker';
}

public function getTemplate()
{
return '_colourpicker.twig';
}

public function getStorageType()
{
return 'text';
}

public function getStorageOptions()
{
return array('default' => '');
return ['default' => ''];
}
}
32 changes: 0 additions & 32 deletions src/Provider/ConfigProvider.php

This file was deleted.

File renamed without changes.
8 changes: 4 additions & 4 deletions tests/ColourpickerTest.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php
namespace Bolt\Extensions\Bolt\Colourpicker\Tests;
namespace Bolt\Extensions\Bolt\ColourPicker\Tests;

use Bolt\Tests\BoltUnitTest;
use Bolt\Extensions\Bolt\Colourpicker\Extension;
use Bolt\Extensions\Bolt\ColourPicker\Extension;

/**
* This test ensures the Colourpicker Loads correctly.
* This test ensures the ColourPicker Loads correctly.
*
* @author Ross Riley <[email protected]>
**/

class ColourpickerTest extends BoltUnitTest
class ColourPickerTest extends BoltUnitTest
{
public function testExtensionLoads()
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 00d2588

Please sign in to comment.