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
This commit is contained in:
@@ -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()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
31
core/c/typeclosediv.php
Normal file
31
core/c/typeclosediv.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace Nibiru\Form;
|
||||
use Nibiru\Adapter;
|
||||
/**
|
||||
* Copyright 2020 Nibiru Framework
|
||||
* Licence: BSD 4-Old License
|
||||
* Author: Stephan Kasdorf
|
||||
* File: typeclosediv.php
|
||||
* Date: 05.09.20
|
||||
*/
|
||||
class TypeCloseDiv extends FormAttributes implements IForm
|
||||
{
|
||||
/**
|
||||
* @param $attributes
|
||||
* @return mixed
|
||||
*/
|
||||
public function loadElement($attributes)
|
||||
{
|
||||
parent::__construct( );
|
||||
$this->_setElement();
|
||||
return $this->getElement();
|
||||
}
|
||||
|
||||
/**
|
||||
* just a closing div element
|
||||
*/
|
||||
private function _setElement( )
|
||||
{
|
||||
$this->_element = '</div>' . "\n";
|
||||
}
|
||||
}
|
||||
38
core/c/typeopendiv.php
Normal file
38
core/c/typeopendiv.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace Nibiru\Form;
|
||||
use Nibiru\Adapter;
|
||||
/**
|
||||
* Copyright 2020 Nibiru Framework
|
||||
* Licence: BSD 4-Old License
|
||||
* Author: Stephan Kasdorf
|
||||
* File: typeopendiv.php
|
||||
* Date: 05.09.20
|
||||
*/
|
||||
class TypeOpenDiv extends FormAttributes implements IForm
|
||||
{
|
||||
private $_attributes = array(
|
||||
self::FORM_VALUE => '',
|
||||
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 = '<div ID CLASS>' . "\n";
|
||||
}
|
||||
}
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user