Advertisement
PifyZ

Untitled

May 29th, 2016
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.27 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * This file is part of Pi.
  5.  *
  6.  * Pi is free software: you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation, either version 3 of the License, or
  9.  * (at your option) any later version.
  10.  *
  11.  * Pi is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with Pi.  If not, see <http://www.gnu.org/licenses/>.
  18.  */
  19.  
  20. namespace Module\Core;
  21.  
  22. use Pi\Core\Module;
  23.  
  24. class CoreModule extends Module {
  25.     public function initialize() {
  26.         $this->registerField('checkboxes', Field\CheckboxesField::class);
  27.         $this->registerField('choice', Field\ChoiceField::class);
  28.         $this->registerField('color', Field\ColorField::class);
  29.         $this->registerField('date', Field\DateField::class);
  30.         $this->registerField('email', Field\EmailField::class);
  31.         $this->registerField('file', Field\FileField::class);
  32.         $this->registerField('number', Field\NumberField::class);
  33.         $this->registerField('password', Field\PasswordField::class);
  34.         $this->registerField('radio', Field\RadioField::class);
  35.         $this->registerField('range', Field\RangeField::class);
  36.         $this->registerField('slug', Field\SlugField::class);
  37.         $this->registerField('tags', Field\TagsField::class);
  38.         $this->registerField('tel', Field\TelField::class);
  39.         $this->registerField('textarea', Field\TextareaField::class);
  40.         $this->registerField('text', Field\TextField::class);
  41.         $this->registerField('time', Field\TimeField::class);
  42.         $this->registerField('title', Field\TitleField::class);
  43.         $this->registerField('url', Field\UrlField::class);
  44.         $this->registerField('user', Field\UserField::class);
  45.         $this->registerField('version', Field\VersionField::class);
  46.  
  47.         /*
  48.         $this->registerModel(
  49.             'all',
  50.             __DIR__ . DS . 'models' . DS . 'all' . DS . 'model.json',
  51.             __DIR__ . DS . 'models' . DS . 'all' . DS . 'view.html');
  52.         */
  53.  
  54.         $this->registerModelFromClass(
  55.             'article',
  56.             Model\ArticleModel::class);
  57.  
  58.         $this->registerModelFromClass(
  59.             'page',
  60.             Model\PageModel::class);
  61.     }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement