1 <?php
2
3 /*
4 * This file is part of the Icybee package.
5 *
6 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Icybee\Modules\Articles;
13
14 use Brickrouge\Form;
15 use Brickrouge\Element;
16
17 /**
18 * A block used to edit articles.
19 */
20 class EditBlock extends \Icybee\Modules\Contents\EditBlock
21 {
22 protected function lazy_get_children()
23 {
24 return array_merge
25 (
26 parent::lazy_get_children(), array
27 (
28 Article::DATE => new \Brickrouge\DateTime
29 (
30 array
31 (
32 Form::LABEL => 'Date',
33 Element::REQUIRED => true,
34 Element::DEFAULT_VALUE => date('Y-m-d H:i:s')
35 )
36 )
37 )
38 );
39 }
40 }
41