Created
May 26, 2015 15:17
-
-
Save cornernote/b68ad9f0c57bef7428e0 to your computer and use it in GitHub Desktop.
hacky DateTimeProvider to add spaces
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
<?php | |
namespace app\gii\giiant\providers; | |
class DateTimeProvider extends \schmunk42\giiant\crud\providers\DateTimeProvider | |
{ | |
public function activeField($attribute) | |
{ | |
$data = parent::activeField($attribute); | |
if ($data === null) return null; | |
$data = explode("\n", $data); | |
foreach ($data as $k => &$v) if ($k) $v = ' ' . $v; | |
$data = implode("\n", $data); | |
return $data; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment