Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
Moved config folder out of src according to latest specs
Browse files Browse the repository at this point in the history
  • Loading branch information
elboletaire committed Aug 4, 2014
1 parent 8dc5b3b commit b0eb19f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 6 additions & 0 deletions config/forms.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
$config = [
'inputContainer' => '<div class="form-group {{type}}{{required}}">{{content}}</div>',
'inputContainerError' => '<div class="form-group {{type}}{{required}} has-error">{{content}}{{error}}</div>',
'error' => '<div class="error-message text-danger">{{content}}</div>'
];
6 changes: 0 additions & 6 deletions src/Config/forms.php

This file was deleted.

6 changes: 3 additions & 3 deletions src/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Bootstrap\View\Helper;

use Cake\Core\App;
use Cake\Core\Plugin;
use Cake\View\View;
use Cake\View\Helper;

Expand All @@ -23,9 +24,8 @@ public function __construct(View $View, array $config = [])
$config['templateClass'] = 'Bootstrap\View\StringTemplate';

parent::__construct($View, $config);

$form_templates = App::path('Config', 'Bootstrap');
$form_templates = realpath(array_pop($form_templates) . 'forms.php');
$form_templates = Plugin::path('Bootstrap') . 'config' . DS;
$form_templates = realpath($form_templates . 'forms.php');
$form_templates = function() use ($form_templates) {
require $form_templates;
return $config;
Expand Down

0 comments on commit b0eb19f

Please sign in to comment.