-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from ThaDafinser/imonteiro-master
style: align + strike
- Loading branch information
Showing
10 changed files
with
167 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
namespace ZfcDatagrid\Column\Style; | ||
|
||
class Align extends AbstractStyle | ||
{ | ||
/** | ||
* | ||
* @var string | ||
*/ | ||
public static $LEFT = 'left'; | ||
|
||
/** | ||
* | ||
* @var string | ||
*/ | ||
public static $RIGHT = 'right'; | ||
|
||
/** | ||
* | ||
* @var string | ||
*/ | ||
public static $CENTER = 'center'; | ||
|
||
/** | ||
* | ||
* @var string | ||
*/ | ||
public static $JUSTIFY= 'justify'; | ||
|
||
/** | ||
* | ||
* @var string | ||
*/ | ||
protected $alignment; | ||
|
||
public function __construct($alignment = self::LEFT) | ||
{ | ||
$this->setAlignment($alignment); | ||
} | ||
|
||
/** | ||
* | ||
* @param string $alignment | ||
* @return self | ||
*/ | ||
public function setAlignment($alignment) | ||
{ | ||
$this->alignment = $alignment; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* | ||
* @return string | ||
*/ | ||
public function getAlignment() | ||
{ | ||
return $this->alignment; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
namespace ZfcDatagridTest\Column\Style; | ||
|
||
use PHPUnit_Framework_TestCase; | ||
use ZfcDatagrid\Column\Style; | ||
|
||
/** | ||
* @group Column | ||
* @covers ZfcDatagrid\Column\Style\Strikethrough | ||
*/ | ||
class StrikethroughTest extends PHPUnit_Framework_TestCase | ||
{ | ||
public function testCanCreateInstance() | ||
{ | ||
$strikethrough = new Style\Strikethrough(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters