cwbit / cakephp-bootstrap-suite Goto Github PK
View Code? Open in Web Editor NEWCakePHP Bootstrap Plugin with helpers and other things needed for easy use of the Bootsrap CSS and JS framework
CakePHP Bootstrap Plugin with helpers and other things needed for easy use of the Bootsrap CSS and JS framework
BootstrapForm and BootstrapHtml currently use Boostcake classes as parents instead of overriding Form and Html directly
Very difficult to set up a bar and its segments. Is there a way to simplify this to maybe let you create a bar and its segments all in one call?
Multipart entities often set their parts based on the create() parameters. This has two drawbacks: 1) each Multipart create statement needs to be written manually, and 2) it breaks the ability to use the create parameters as intended - e.g. you can no longer actually set the $options, $keyRemaps, etc
Solution
Create an array of keys to look for in $data that will be mapped to exact parts
For example $partMaps = array('PartName'=>'data-key', 'AnotherPart'=>'description')
then in the Multipart Create, if $partMaps is set, look in data for the keys .e.g $this->AnotherPart->create($data['description'],...);
It'd also be nice to be able to specify Parts by create args[] index value e.g.
create($label, $caption, $image)
$partArrays = [0=>'Label',1=>'Caption',2=>'Image']
Combining the two would result in something like this
public $partMaps = [ '{key}' => '{PART}'];
public function create(....){
//if $partMaps, look through for keys either in $data or args() if numeric
}
Nav helper needs to be updated to use the new entity architecture.
This is probably going to need the pass-through design of #1 in order to work properly, as Nav groups can contain any type and amount of any valid Nav item
Something is breaking in the Collection class - it seems that calling Collection->add()->addMultiple() is going one level too deep as if the addMultiple() is being called on the Entity class instead of the Entity Collection class.
I just pushed a fix in 9a9a7fd but accidentally commented out the fix (was testing an additional condition). FAIL!
Un-comment and push the fix again.
Some entities (e.g. Thumbnail Captions, and Nav Groups) are just wrappers for arbitrary subcontent. There is nothing, for instance, that limits what can go inside of a Thumbnail Caption, but the caption holder itself needs to be formatted a specific way.
Requiring entity subclasses for each possible thing that a caption can contain is not reasonable.
It would be nice if elements could be added to certain entities (namely, get wrapped properly inside :content) by some sort of entity passthrough.
Especially in the case of Nav bars, the order in which an element is added needs to be preserved. For example with Navs you can add a bunch of ordered links followed by a dropdown, and then more ordered links. The order in which the elements are added needs to be the order in which they are rendered.
For example
$this->Thumbnail->Caption->add('p', 'paragraph');
# or
$this->Thumbnail->Caption->add('<p>paragraph</p>');
# or
$p = //.. paragraph entity;
$i = //... image entity;
$thumbnail->Caption->include($p, $i);
The Entity classes are really completely abstract and are not actually tied to Bootstrap itself. It might make more sense to move them into a different project and use composer to add them as a dependency to this project.
Most entities really don't need to extend all the way back up the Helper chain - really just the parent Helper needs to be able to do so.
Is there any way to remove AppHelper as the parent for each of the subclasses - this should really reduce memory usage (should test this before committing changes to all class types) but it would make sense that removing such a heavy parent structure would make the framework faster.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.