@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Ffcms\Core\App as MainApp; |
| 6 | 6 | use Ffcms\Core\Arch\ActiveModel; |
| 7 | 7 | use Ffcms\Core\Helper\Type\Arr; |
| 8 | -use Ffcms\Core\Helper\Type\Str; |
|
| 9 | 8 | |
| 10 | 9 | class Role extends ActiveModel |
| 11 | 10 | { |
@@ -14,13 +14,13 @@ discard block |
||
| 14 | 14 | $this->title = __('User list'); |
| 15 | 15 | |
| 16 | 16 | if ($id === 'all') { |
| 17 | - $this->title .= ': ' . __('All'); |
|
| 17 | + $this->title .= ': '.__('All'); |
|
| 18 | 18 | } elseif ($id === 'rating') { |
| 19 | - $this->title .= ': ' . __('Rating'); |
|
| 19 | + $this->title .= ': '.__('Rating'); |
|
| 20 | 20 | } elseif ($id === 'city') { |
| 21 | - $this->title .= ': ' . __('City') . ' ' . \App::$Security->strip_tags($add); |
|
| 21 | + $this->title .= ': '.__('City').' '.\App::$Security->strip_tags($add); |
|
| 22 | 22 | } elseif ($id === 'hobby') { |
| 23 | - $this->title .= ': ' . __('Hobby') . ' ' . \App::$Security->strip_tags($add); |
|
| 23 | + $this->title .= ': '.__('Hobby').' '.\App::$Security->strip_tags($add); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | $this->breadcrumbs = [ |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | <?php |
| 37 | 37 | if ($records === null || $records->count() < 1) { |
| 38 | - echo '<div class="alert alert-danger">' . __('Users are not founded!') . '</div>'; |
|
| 38 | + echo '<div class="alert alert-danger">'.__('Users are not founded!').'</div>'; |
|
| 39 | 39 | return; |
| 40 | 40 | } |
| 41 | 41 | ?> |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | </div> |
| 49 | 49 | <div class="col-md-8"> |
| 50 | 50 | <h3> |
| 51 | - <?= Url::link(['profile/show', $profile->user_id], Str::likeEmpty($profile->nick) ? __('No name') . '(id' . $profile->user_id . ')' : $profile->nick) ?> |
|
| 51 | + <?= Url::link(['profile/show', $profile->user_id], Str::likeEmpty($profile->nick) ? __('No name').'(id'.$profile->user_id.')' : $profile->nick) ?> |
|
| 52 | 52 | </h3> |
| 53 | 53 | <p><?= __('Registered') ?>: <?= Date::convertToDatetime($profile->created_at, Date::FORMAT_TO_DAY) ?></p> |
| 54 | 54 | <?php if (\App::$User->identity() !== null && $profile->user_id !== \App::$User->identity()->getId()): ?> |
| 55 | - <?= Url::link(['profile/messages', null, null, ['newdialog' => $profile->user_id]], '<i class="fa fa-pencil-square-o"></i> ' . __('New message'), ['class' => 'btn btn-info']) ?> |
|
| 55 | + <?= Url::link(['profile/messages', null, null, ['newdialog' => $profile->user_id]], '<i class="fa fa-pencil-square-o"></i> '.__('New message'), ['class' => 'btn btn-info']) ?> |
|
| 56 | 56 | <?php endif; ?> |
| 57 | 57 | </div> |
| 58 | 58 | <div class="col-md-2"> |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | date_default_timezone_set(App::$Properties->get('timezone')); |
| 14 | 14 | |
| 15 | 15 | return [ |
| 16 | - 'Database' => function () { |
|
| 16 | + 'Database' => function() { |
|
| 17 | 17 | $capsule = new Capsule; |
| 18 | 18 | if (env_name !== 'Install') { |
| 19 | 19 | try { |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | try { |
| 35 | 35 | $capsule->connection()->getPdo(); |
| 36 | 36 | } catch (\Exception $e) { |
| 37 | - $instUri = \App::$Alias->scriptUrl . '/install'; |
|
| 37 | + $instUri = \App::$Alias->scriptUrl.'/install'; |
|
| 38 | 38 | \App::$Response->redirect($instUri, true); |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | try { |
| 47 | 47 | $pdo = \App::$Database->connection()->getPdo(); |
| 48 | 48 | $handler = new PdoSessionHandler($pdo, [ |
| 49 | - 'db_table' => App::$Properties->get('database')['prefix'] . 'sessions' |
|
| 49 | + 'db_table' => App::$Properties->get('database')['prefix'].'sessions' |
|
| 50 | 50 | ]); |
| 51 | 51 | } catch (Exception $e) { |
| 52 | - $handler = new NativeFileSessionHandler(root . '/Private/Sessions'); |
|
| 52 | + $handler = new NativeFileSessionHandler(root.'/Private/Sessions'); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $storage = new NativeSessionStorage([ |
@@ -60,21 +60,21 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | return new Session($storage); |
| 62 | 62 | }, |
| 63 | - 'User' => function () { |
|
| 63 | + 'User' => function() { |
|
| 64 | 64 | return new Apps\ActiveRecord\User(); |
| 65 | 65 | }, |
| 66 | - 'Mailer' => function () { |
|
| 66 | + 'Mailer' => function() { |
|
| 67 | 67 | $swiftTransport = Swift_MailTransport::newInstance(); |
| 68 | 68 | return Swift_Mailer::newInstance($swiftTransport); |
| 69 | 69 | }, |
| 70 | - 'Captcha' => function () { |
|
| 70 | + 'Captcha' => function() { |
|
| 71 | 71 | return new Extend\Core\Captcha\Gregwar(); |
| 72 | 72 | }, |
| 73 | - 'Cache' => function () { |
|
| 73 | + 'Cache' => function() { |
|
| 74 | 74 | // initialize cache manager. You can use redis, memcache or anything else. Look at: phpfastcache.com |
| 75 | 75 | CacheManager::setup([ |
| 76 | 76 | 'storage' => 'files', |
| 77 | - 'path' => root . '/Private/Cache' |
|
| 77 | + 'path' => root.'/Private/Cache' |
|
| 78 | 78 | ]); |
| 79 | 79 | return CacheManager::getInstance('files'); |
| 80 | 80 | }, |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Apps\Model\Front\Profile; |
| 4 | 4 | |
| 5 | 5 | use Apps\ActiveRecord\Blacklist; |
| 6 | -use Ffcms\Core\App; |
|
| 7 | 6 | use Ffcms\Core\Arch\Model; |
| 8 | 7 | use Ffcms\Core\Interfaces\iUser; |
| 9 | 8 | |
@@ -1,9 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -use Ffcms\Core\Helper\Date; |
|
| 4 | 3 | use Ffcms\Core\Helper\HTML\Form; |
| 5 | 4 | use Ffcms\Core\Helper\Simplify; |
| 6 | -use Ffcms\Core\Helper\Type\Str; |
|
| 7 | 5 | use Ffcms\Core\Helper\Url; |
| 8 | 6 | |
| 9 | 7 | /** @var $model Apps\Model\Front\Profile\FormIgnoreDelete */ |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php return [ |
| 2 | - 'Alias' => [ |
|
| 3 | - 'Front' => [ |
|
| 4 | - '/' => '/content/list/news' |
|
| 5 | - ] |
|
| 6 | - ] |
|
| 2 | + 'Alias' => [ |
|
| 3 | + 'Front' => [ |
|
| 4 | + '/' => '/content/list/news' |
|
| 5 | + ] |
|
| 6 | + ] |
|
| 7 | 7 | ]; |
| 8 | 8 | \ No newline at end of file |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | public $captcha; |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * Labels for visual display |
|
| 26 | - */ |
|
| 25 | + * Labels for visual display |
|
| 26 | + */ |
|
| 27 | 27 | public function labels() |
| 28 | 28 | { |
| 29 | 29 | return [ |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * Validation rules |
|
| 37 | - */ |
|
| 36 | + * Validation rules |
|
| 37 | + */ |
|
| 38 | 38 | public function rules() |
| 39 | 39 | { |
| 40 | 40 | return [ |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | - * Parse public attribute values from input object data |
|
| 35 | - */ |
|
| 34 | + * Parse public attribute values from input object data |
|
| 35 | + */ |
|
| 36 | 36 | public function before() |
| 37 | 37 | { |
| 38 | 38 | $this->name = $this->_role->name; |
@@ -42,9 +42,9 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | - * Display labels data |
|
| 45 | + * Display labels data |
|
| 46 | 46 | * @return array |
| 47 | - */ |
|
| 47 | + */ |
|
| 48 | 48 | public function labels() |
| 49 | 49 | { |
| 50 | 50 | return [ |
@@ -95,5 +95,5 @@ |
||
| 95 | 95 | </div> |
| 96 | 96 | <?php if (count($staticItems) < 1 && count($dynamicItems) < 1): ?> |
| 97 | 97 | <p class="alert alert-warning"><?= __('Custom routes is not yet found') ?></p> |
| 98 | -<?php endif ;?> |
|
| 99 | -<?= Url::link(['main/addroute'], '<i class="fa fa-plus"></i> ' . __('New route'), ['class' => 'btn btn-primary']) ?> |
|
| 100 | 98 | \ No newline at end of file |
| 99 | +<?php endif; ?> |
|
| 100 | +<?= Url::link(['main/addroute'], '<i class="fa fa-plus"></i> '.__('New route'), ['class' => 'btn btn-primary']) ?> |
|
| 101 | 101 | \ No newline at end of file |