From 9366948b0bd4f6641e22c3cecbb5cfdf9fcc9068 Mon Sep 17 00:00:00 2001 From: Stephan Kasdorf Date: Sat, 5 Sep 2020 16:46:24 +0200 Subject: [PATCH] Version 0.9.5 beta - added opening and closing div to be put anywhere in the form, fixed some configuration bugs, and warnings in the autoloading class --- application/controller/formsController.php | 4 +- .../settings/config/settings.development.ini | 1 + core/c/autoloader.php | 15 +++++--- core/c/typeclosediv.php | 31 +++++++++++++++ core/c/typeopendiv.php | 38 +++++++++++++++++++ core/framework.php | 2 + 6 files changed, 82 insertions(+), 9 deletions(-) create mode 100644 core/c/typeclosediv.php create mode 100644 core/c/typeopendiv.php diff --git a/application/controller/formsController.php b/application/controller/formsController.php index 4280196..d374aac 100644 --- a/application/controller/formsController.php +++ b/application/controller/formsController.php @@ -31,7 +31,6 @@ class formsController extends Controller 'class' => 'input-text' ) ); - Form::addTypeLabel( array( 'value' => 'Email', @@ -39,7 +38,6 @@ class formsController extends Controller 'class' => 'contacts-label' ) ); - Form::addInputTypeText( array( 'name' => 'email', @@ -55,7 +53,7 @@ class formsController extends Controller Form::addTypeButton( array( 'class' => 'btn-block btn-info', - 'name' => 'Send Message' + 'value' => 'Send Message' ) ); diff --git a/application/settings/config/settings.development.ini b/application/settings/config/settings.development.ini index fa942e7..75e76eb 100644 --- a/application/settings/config/settings.development.ini +++ b/application/settings/config/settings.development.ini @@ -30,6 +30,7 @@ dbmodel = "/../../application/model/" module = "/../../application/module/[NAME]" interfaces = "/../../application/module/[NAME]/interfaces/" traits = "/../../application/module/[NAME]/traits/" +plugins = "/../../application/module/[NAME]/plugins/" entriesperpage = 4 background.img[] = "public/img/nibiru3.jpg" smarty.css[] = "public/css/v3/roboto.css" diff --git a/core/c/autoloader.php b/core/c/autoloader.php index 378ef5e..f43cac3 100644 --- a/core/c/autoloader.php +++ b/core/c/autoloader.php @@ -334,13 +334,16 @@ class Autoloader { foreach ($iterator as $item) { - if(strstr($item->getFilename(), $pluginName)) + if(!empty($pluginName)) { - if ($item->getFileName() != self::MY_FILE_NAME && $item->getFileName() != "." && $item->getFileName() != ".." && strstr($item->getFileName(), self::PHP_FILE_EXTENSION)) { - $plugins[] = array( - 'nfilename' => str_replace('.php', '', $item->getFileName()), - 'filepathname' => $item->getPath() . '/' . $item->getFileName() - ); + if(strstr($item->getFilename(), $pluginName)) + { + if ($item->getFileName() != self::MY_FILE_NAME && $item->getFileName() != "." && $item->getFileName() != ".." && strstr($item->getFileName(), self::PHP_FILE_EXTENSION)) { + $plugins[] = array( + 'nfilename' => str_replace('.php', '', $item->getFileName()), + 'filepathname' => $item->getPath() . '/' . $item->getFileName() + ); + } } } } diff --git a/core/c/typeclosediv.php b/core/c/typeclosediv.php new file mode 100644 index 0000000..39b4806 --- /dev/null +++ b/core/c/typeclosediv.php @@ -0,0 +1,31 @@ +_setElement(); + return $this->getElement(); + } + + /** + * just a closing div element + */ + private function _setElement( ) + { + $this->_element = '' . "\n"; + } +} \ No newline at end of file diff --git a/core/c/typeopendiv.php b/core/c/typeopendiv.php new file mode 100644 index 0000000..f8fa437 --- /dev/null +++ b/core/c/typeopendiv.php @@ -0,0 +1,38 @@ + '', + self::FORM_ATTRIBUTE_ID => '', + self::FORM_ATTRIBUTE_CLASS => '' + ); + + /** + * @param $attributes + * @return mixed + */ + public function loadElement($attributes) + { + parent::__construct( $this->_attributes ); + $this->_setElement(); + $this->_setAttributes( self::loadAttributeValues( $attributes ) ); + return $this->getElement(); + } + + /** + * just the opening div element + */ + private function _setElement( ) + { + $this->_element = '
' . "\n"; + } +} \ No newline at end of file diff --git a/core/framework.php b/core/framework.php index 8e56fed..c694100 100644 --- a/core/framework.php +++ b/core/framework.php @@ -81,6 +81,8 @@ require_once __DIR__ . '/c/typeselect.php'; require_once __DIR__ . '/c/typerange.php'; require_once __DIR__ . '/c/typeurl.php'; require_once __DIR__ . '/c/typelabel.php'; +require_once __DIR__ . '/c/typeopendiv.php'; +require_once __DIR__ . '/c/typeclosediv.php'; require_once __DIR__ . '/i/view.php'; require_once __DIR__ . '/c/view.php'; require_once __DIR__ . '/i/controller.php';