Skip to content

Commit

Permalink
Add Bootstrap interface
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Dec 23, 2019
1 parent 0a4f416 commit 0a9d15a
Show file tree
Hide file tree
Showing 15 changed files with 247 additions and 105 deletions.
18 changes: 9 additions & 9 deletions Alert/AlertInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace WBW\Bundle\BootstrapBundle\Alert;

use WBW\Bundle\BootstrapBundle\BootstrapInterface;
use WBW\Bundle\BootstrapBundle\WBWBootstrapInterface;

/**
* Alert interface.
Expand All @@ -26,56 +26,56 @@ interface AlertInterface {
*
* @var string
*/
const ALERT_TYPE_DANGER = BootstrapInterface::BOOTSTRAP_DANGER;
const ALERT_TYPE_DANGER = WBWBootstrapInterface::BOOTSTRAP_DANGER;

/**
* Alert type "dark".
*
* @var string
*/
const ALERT_TYPE_DARK = BootstrapInterface::BOOTSTRAP_DARK;
const ALERT_TYPE_DARK = WBWBootstrapInterface::BOOTSTRAP_DARK;

/**
* Alert type "info".
*
* @var string
*/
const ALERT_TYPE_INFO = BootstrapInterface::BOOTSTRAP_INFO;
const ALERT_TYPE_INFO = WBWBootstrapInterface::BOOTSTRAP_INFO;

/**
* Alert type "light".
*
* @var string
*/
const ALERT_TYPE_LIGHT = BootstrapInterface::BOOTSTRAP_LIGHT;
const ALERT_TYPE_LIGHT = WBWBootstrapInterface::BOOTSTRAP_LIGHT;

/**
* Alert type "primary".
*
* @var string
*/
const ALERT_TYPE_PRIMARY = BootstrapInterface::BOOTSTRAP_PRIMARY;
const ALERT_TYPE_PRIMARY = WBWBootstrapInterface::BOOTSTRAP_PRIMARY;

/**
* Alert type "secondary".
*
* @var string
*/
const ALERT_TYPE_SECONDARY = BootstrapInterface::BOOTSTRAP_SECONDARY;
const ALERT_TYPE_SECONDARY = WBWBootstrapInterface::BOOTSTRAP_SECONDARY;

/**
* Alert type "success".
*
* @var string
*/
const ALERT_TYPE_SUCCESS = BootstrapInterface::BOOTSTRAP_SUCCESS;
const ALERT_TYPE_SUCCESS = WBWBootstrapInterface::BOOTSTRAP_SUCCESS;

/**
* Alert type "warning".
*
* @var string
*/
const ALERT_TYPE_WARNING = BootstrapInterface::BOOTSTRAP_WARNING;
const ALERT_TYPE_WARNING = WBWBootstrapInterface::BOOTSTRAP_WARNING;

/**
* Get the content.
Expand Down
18 changes: 9 additions & 9 deletions Badge/BadgeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace WBW\Bundle\BootstrapBundle\Badge;

use WBW\Bundle\BootstrapBundle\BootstrapInterface;
use WBW\Bundle\BootstrapBundle\WBWBootstrapInterface;

/**
* Badge interface.
Expand All @@ -26,56 +26,56 @@ interface BadgeInterface {
*
* @var string
*/
const BADGE_TYPE_DANGER = BootstrapInterface::BOOTSTRAP_DANGER;
const BADGE_TYPE_DANGER = WBWBootstrapInterface::BOOTSTRAP_DANGER;

/**
* Badge type "dark".
*
* @var string
*/
const BADGE_TYPE_DARK = BootstrapInterface::BOOTSTRAP_DARK;
const BADGE_TYPE_DARK = WBWBootstrapInterface::BOOTSTRAP_DARK;

/**
* Badge type "info".
*
* @var string
*/
const BADGE_TYPE_INFO = BootstrapInterface::BOOTSTRAP_INFO;
const BADGE_TYPE_INFO = WBWBootstrapInterface::BOOTSTRAP_INFO;

/**
* Badge type "light".
*
* @var string
*/
const BADGE_TYPE_LIGHT = BootstrapInterface::BOOTSTRAP_LIGHT;
const BADGE_TYPE_LIGHT = WBWBootstrapInterface::BOOTSTRAP_LIGHT;

/**
* Badge type "primary".
*
* @var string
*/
const BADGE_TYPE_PRIMARY = BootstrapInterface::BOOTSTRAP_PRIMARY;
const BADGE_TYPE_PRIMARY = WBWBootstrapInterface::BOOTSTRAP_PRIMARY;

/**
* Badge type "secondary".
*
* @var string
*/
const BADGE_TYPE_SECONDARY = BootstrapInterface::BOOTSTRAP_SECONDARY;
const BADGE_TYPE_SECONDARY = WBWBootstrapInterface::BOOTSTRAP_SECONDARY;

/**
* Badge type "success".
*
* @var string
*/
const BADGE_TYPE_SUCCESS = BootstrapInterface::BOOTSTRAP_SUCCESS;
const BADGE_TYPE_SUCCESS = WBWBootstrapInterface::BOOTSTRAP_SUCCESS;

/**
* Badge type "warning".
*
* @var string
*/
const BADGE_TYPE_WARNING = BootstrapInterface::BOOTSTRAP_WARNING;
const BADGE_TYPE_WARNING = WBWBootstrapInterface::BOOTSTRAP_WARNING;

/**
* Get the content.
Expand Down
23 changes: 12 additions & 11 deletions BootstrapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*
* @author webeweb <https://github.com/webeweb/>
* @package WBW\Bundle\BootstrapBundle
* @deprecated since 3.5.0, use {@see WBW\Bundle\BootstrapBundle\BootstrapInterface}
*/
interface BootstrapInterface {

Expand All @@ -24,75 +25,75 @@ interface BootstrapInterface {
*
* @var string
*/
const BOOTSTRAP_DANGER = "danger";
const BOOTSTRAP_DANGER = WBWBootstrapInterface::BOOTSTRAP_DANGER;

/**
* Bootstrap "dark".
*
* @var string
*/
const BOOTSTRAP_DARK = "dark";
const BOOTSTRAP_DARK = WBWBootstrapInterface::BOOTSTRAP_DARK;

/**
* Bootstrap "default".
*
* @var string
*/
const BOOTSTRAP_DEFAULT = "default";
const BOOTSTRAP_DEFAULT = WBWBootstrapInterface::BOOTSTRAP_DEFAULT;

/**
* Bootstrap "info".
*
* @var string
*/
const BOOTSTRAP_INFO = "info";
const BOOTSTRAP_INFO = WBWBootstrapInterface::BOOTSTRAP_INFO;

/**
* Bootstrap "light".
*
* @var string
*/
const BOOTSTRAP_LIGHT = "light";
const BOOTSTRAP_LIGHT = WBWBootstrapInterface::BOOTSTRAP_LIGHT;

/**
* Bootstrap "primary".
*
* @var string
*/
const BOOTSTRAP_PRIMARY = "primary";
const BOOTSTRAP_PRIMARY = WBWBootstrapInterface::BOOTSTRAP_PRIMARY;

/**
* Bootstrap "secondary".
*
* @var string
*/
const BOOTSTRAP_SECONDARY = "secondary";
const BOOTSTRAP_SECONDARY = WBWBootstrapInterface::BOOTSTRAP_SECONDARY;

/**
* Bootstrap "success".
*
* @var string
*/
const BOOTSTRAP_SUCCESS = "success";
const BOOTSTRAP_SUCCESS = WBWBootstrapInterface::BOOTSTRAP_SUCCESS;

/**
* Bootstrap version 3.
*
* @var string
*/
const BOOTSTRAP_VERSION_3 = "3.4.1";
const BOOTSTRAP_VERSION_3 = WBWBootstrapInterface::BOOTSTRAP_VERSION_3;

/**
* Bootstrap version 4.
*
* @var string
*/
const BOOTSTRAP_VERSION_4 = "4.3.1";
const BOOTSTRAP_VERSION_4 = WBWBootstrapInterface::BOOTSTRAP_VERSION_4;

/**
* Bootstrap "warning".
*
* @var string
*/
const BOOTSTRAP_WARNING = "warning";
const BOOTSTRAP_WARNING = WBWBootstrapInterface::BOOTSTRAP_WARNING;
}
20 changes: 10 additions & 10 deletions Button/ButtonInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace WBW\Bundle\BootstrapBundle\Button;

use WBW\Bundle\BootstrapBundle\BootstrapInterface;
use WBW\Bundle\BootstrapBundle\WBWBootstrapInterface;

/**
* Button interface.
Expand Down Expand Up @@ -47,35 +47,35 @@ interface ButtonInterface {
*
* @var string
*/
const BUTTON_TYPE_DANGER = BootstrapInterface::BOOTSTRAP_DANGER;
const BUTTON_TYPE_DANGER = WBWBootstrapInterface::BOOTSTRAP_DANGER;

/**
* Button type "dark".
*
* @var string
*/
const BUTTON_TYPE_DARK = BootstrapInterface::BOOTSTRAP_DARK;
const BUTTON_TYPE_DARK = WBWBootstrapInterface::BOOTSTRAP_DARK;

/**
* Button type "default".
*
* @var string
*/
const BUTTON_TYPE_DEFAULT = BootstrapInterface::BOOTSTRAP_DEFAULT;
const BUTTON_TYPE_DEFAULT = WBWBootstrapInterface::BOOTSTRAP_DEFAULT;

/**
* Button type "info".
*
* @var string
*/
const BUTTON_TYPE_INFO = BootstrapInterface::BOOTSTRAP_INFO;
const BUTTON_TYPE_INFO = WBWBootstrapInterface::BOOTSTRAP_INFO;

/**
* Button type "light".
*
* @var string
*/
const BUTTON_TYPE_LIGHT = BootstrapInterface::BOOTSTRAP_LIGHT;
const BUTTON_TYPE_LIGHT = WBWBootstrapInterface::BOOTSTRAP_LIGHT;

/**
* Button type "link".
Expand All @@ -89,25 +89,25 @@ interface ButtonInterface {
*
* @var string
*/
const BUTTON_TYPE_PRIMARY = BootstrapInterface::BOOTSTRAP_PRIMARY;
const BUTTON_TYPE_PRIMARY = WBWBootstrapInterface::BOOTSTRAP_PRIMARY;
/**
* Button type "secondary".
*
* @var string
*/
const BUTTON_TYPE_SECONDARY = BootstrapInterface::BOOTSTRAP_SECONDARY;
const BUTTON_TYPE_SECONDARY = WBWBootstrapInterface::BOOTSTRAP_SECONDARY;
/**
* Button type "success".
*
* @var string
*/
const BUTTON_TYPE_SUCCESS = BootstrapInterface::BOOTSTRAP_SUCCESS;
const BUTTON_TYPE_SUCCESS = WBWBootstrapInterface::BOOTSTRAP_SUCCESS;
/**
* Button type "warning".
*
* @var string
*/
const BUTTON_TYPE_WARNING = BootstrapInterface::BOOTSTRAP_WARNING;
const BUTTON_TYPE_WARNING = WBWBootstrapInterface::BOOTSTRAP_WARNING;

/**
* Get the active.
Expand Down
10 changes: 5 additions & 5 deletions ProgressBar/ProgressBarInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace WBW\Bundle\BootstrapBundle\ProgressBar;

use WBW\Bundle\BootstrapBundle\BootstrapInterface;
use WBW\Bundle\BootstrapBundle\WBWBootstrapInterface;

/**
* Progress bar interface.
Expand All @@ -26,28 +26,28 @@ interface ProgressBarInterface {
*
* @var string
*/
const PROGRESS_BAR_TYPE_DANGER = BootstrapInterface::BOOTSTRAP_DANGER;
const PROGRESS_BAR_TYPE_DANGER = WBWBootstrapInterface::BOOTSTRAP_DANGER;

/**
* Progress bar type "info".
*
* @var string
*/
const PROGRESS_BAR_TYPE_INFO = BootstrapInterface::BOOTSTRAP_INFO;
const PROGRESS_BAR_TYPE_INFO = WBWBootstrapInterface::BOOTSTRAP_INFO;

/**
* Progress bar type "success".
*
* @var string
*/
const PROGRESS_BAR_TYPE_SUCCESS = BootstrapInterface::BOOTSTRAP_SUCCESS;
const PROGRESS_BAR_TYPE_SUCCESS = WBWBootstrapInterface::BOOTSTRAP_SUCCESS;

/**
* Progress bar type "warning".
*
* @var string
*/
const PROGRESS_BAR_TYPE_WARNING = BootstrapInterface::BOOTSTRAP_WARNING;
const PROGRESS_BAR_TYPE_WARNING = WBWBootstrapInterface::BOOTSTRAP_WARNING;

/**
* Get the animated.
Expand Down
18 changes: 9 additions & 9 deletions Tests/Alert/AlertInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace WBW\Bundle\BootstrapBundle\Tests\Alert;

use WBW\Bundle\BootstrapBundle\Alert\AlertInterface;
use WBW\Bundle\BootstrapBundle\BootstrapInterface;
use WBW\Bundle\BootstrapBundle\WBWBootstrapInterface;
use WBW\Bundle\BootstrapBundle\Tests\AbstractTestCase;

/**
Expand All @@ -30,13 +30,13 @@ class AlertInterfaceTest extends AbstractTestCase {
*/
public function testConstruct() {

$this->assertEquals(BootstrapInterface::BOOTSTRAP_DANGER, AlertInterface::ALERT_TYPE_DANGER);
$this->assertEquals(BootstrapInterface::BOOTSTRAP_DARK, AlertInterface::ALERT_TYPE_DARK);
$this->assertEquals(BootstrapInterface::BOOTSTRAP_INFO, AlertInterface::ALERT_TYPE_INFO);
$this->assertEquals(BootstrapInterface::BOOTSTRAP_LIGHT, AlertInterface::ALERT_TYPE_LIGHT);
$this->assertEquals(BootstrapInterface::BOOTSTRAP_PRIMARY, AlertInterface::ALERT_TYPE_PRIMARY);
$this->assertEquals(BootstrapInterface::BOOTSTRAP_SECONDARY, AlertInterface::ALERT_TYPE_SECONDARY);
$this->assertEquals(BootstrapInterface::BOOTSTRAP_SUCCESS, AlertInterface::ALERT_TYPE_SUCCESS);
$this->assertEquals(BootstrapInterface::BOOTSTRAP_WARNING, AlertInterface::ALERT_TYPE_WARNING);
$this->assertEquals(WBWBootstrapInterface::BOOTSTRAP_DANGER, AlertInterface::ALERT_TYPE_DANGER);
$this->assertEquals(WBWBootstrapInterface::BOOTSTRAP_DARK, AlertInterface::ALERT_TYPE_DARK);
$this->assertEquals(WBWBootstrapInterface::BOOTSTRAP_INFO, AlertInterface::ALERT_TYPE_INFO);
$this->assertEquals(WBWBootstrapInterface::BOOTSTRAP_LIGHT, AlertInterface::ALERT_TYPE_LIGHT);
$this->assertEquals(WBWBootstrapInterface::BOOTSTRAP_PRIMARY, AlertInterface::ALERT_TYPE_PRIMARY);
$this->assertEquals(WBWBootstrapInterface::BOOTSTRAP_SECONDARY, AlertInterface::ALERT_TYPE_SECONDARY);
$this->assertEquals(WBWBootstrapInterface::BOOTSTRAP_SUCCESS, AlertInterface::ALERT_TYPE_SUCCESS);
$this->assertEquals(WBWBootstrapInterface::BOOTSTRAP_WARNING, AlertInterface::ALERT_TYPE_WARNING);
}
}
Loading

0 comments on commit 0a9d15a

Please sign in to comment.