{"id":20760926,"url":"https://github.com/cakephp-bootstrap/cakephp2-bootstrap2-helpers","last_synced_at":"2025-07-04T08:38:05.227Z","repository":{"id":9819591,"uuid":"11803806","full_name":"CakePHP-Bootstrap/cakephp2-bootstrap2-helpers","owner":"CakePHP-Bootstrap","description":"CakePHP 2.x Helpers for Bootstrap 2","archived":false,"fork":false,"pushed_at":"2014-08-16T10:09:56.000Z","size":302,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-30T05:48:53.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CakePHP-Bootstrap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-31T23:47:28.000Z","updated_at":"2022-04-23T11:32:17.000Z","dependencies_parsed_at":"2022-09-10T01:20:12.115Z","dependency_job_id":null,"html_url":"https://github.com/CakePHP-Bootstrap/cakephp2-bootstrap2-helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CakePHP-Bootstrap/cakephp2-bootstrap2-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakePHP-Bootstrap%2Fcakephp2-bootstrap2-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakePHP-Bootstrap%2Fcakephp2-bootstrap2-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakePHP-Bootstrap%2Fcakephp2-bootstrap2-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakePHP-Bootstrap%2Fcakephp2-bootstrap2-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CakePHP-Bootstrap","download_url":"https://codeload.github.com/CakePHP-Bootstrap/cakephp2-bootstrap2-helpers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CakePHP-Bootstrap%2Fcakephp2-bootstrap2-helpers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263478546,"owners_count":23473021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T10:16:37.104Z","updated_at":"2025-07-04T08:38:05.170Z","avatar_url":"https://github.com/CakePHP-Bootstrap.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cem\u003eNew! Repository for bootstrap v3 available here: https://github.com/Holt59/cakephp-bootstrap3-helpers\u003c/em\u003e\n\nCakePHP 2.x Helpers for Bootstrap 2\n===================================\n\nCakePHP Helpers to generate HTML with @Twitter Boostrap 2 style.\n\n\u003ci\u003e**Warning:** This plugin version is not maintained anymore.\u003c/i\u003e\n\nHow to use?\n===========\n\nJust add Helper files into your View/Helpers directory and load the helpers in you controller:\n```php\npublic $helpers = array(\n    'Html' =\u003e 'BoostrapHtml', \n    'Form' =\u003e 'BootstrapForm', \n    'Paginator' =\u003e 'BoostrapPaginator',\n    'Navbar' =\u003e 'BootstrapNavbar'\n) ;\n```\n\nI tried to keep CakePHP helpers style. You can find the documentation directly in the Helpers files.\n\nBootstrapHtmlHelper\n===================\n\nThis is the subclass of HtmlHelper, with 1 redefinition of method and 3 new methods:\n\n```php\n/**\n * \n * Get crumb lists in a HTML list, with bootstrap like style.\n *\n * @param $options Options for list\n * @param $startText Text to insert before list\n * \n * Unusable options:\n * \t- Separator\n**/\npublic function getCrumbList($options = array(), $startText = null) ;\n\n/**\n *  \n * Create a Twitter Bootstrap style alert block, containing text.\n *  \n * @param $text The alert text\n * @param $options Options that will be passed to Html::div method\n * \n * \n * Available BootstrapHtml options:\n * \t- block: boolean, specify if alert should have 'alert-block' class\n * \t- type: string, type of alert (default, error, info, success)\n *     \n**/\npublic function alert ($text, $options = array()) \n\n/**\n * \n * Create a Twitter Bootstrap icon.\n * \n * @param $icon The type of the icon (search, pencil, etc.)\n * @param $color The color of the icon (black or white)\n * \n**/\npublic function icon ($icon, $color = 'black') \n    \n/**\n *\n * Create a Twitter Bootstrap span label.\n * \n * @param text The label text\n * @param options Options for span\n *\n * Extra options\n *  - type The type of the label\n *\n**/\npublic function label ($text, $options = array()) \n\n/**\n *\n * Create a Twitter Bootstrap span badge.\n * \n * @param text The badge text\n * @param options Options for span\n *\n * Extra options\n *  - type The type of the badge\n *\n**/\npublic function badge ($text, $options = array())\n\n/**\n * \n * Create a Twitter Bootstrap style progress bar.\n * \n * @param $widths \n * \t- The width (in %) of the bar\n * \t- An array of bar, with width and type (info, danger, success, warning) specified for each bar\n * @param $options Options that will be passed to Html::div method (only for main div)\n *  \n * Available BootstrapHtml options:\n * \t- striped: boolean, specify if progress bar should be striped\n * \t- active: boolean, specify if progress bar should be active\n *     \n**/\npublic function progress ($widths, $options = array()) \n```\n\nBootstrapFormHelper\n===================\n\nThis helper redefines the the most importants method of the FormHelper:\n\n1. BootstrapFormHelper::create now allows you to specify if you want a horizontal, inline or search form (see documentation)\n2. BootstrapFormHelper::input now allows you to prepend or append element to your input\n\nbutton, submit and end methods are redefined to add bootstrap btn style, and allow you to specify which button you want (by specifying \"boostrap-size\" and \"boostrap-type\" options).\n\nTwo new methods:\n\n1. dropdownButton which allow you to create dropdown button (see documentation)\n2. searchForm which allow you to quickly create a search form (see documentation)\n\nA small example:\n```php\necho $this-\u003eBootstrapForm-\u003ecreate('', array()) ;\necho $this-\u003eBootstrapForm-\u003einput('text', array(\n    'label' =\u003e 'Search... ',\n    'type' =\u003e 'text',\n    'prepend' =\u003e $this-\u003eBootstrapHtml-\u003eicon('search'),\n    'append' =\u003e array(\n            $this-\u003eBootstrapForm-\u003edropdownButton(__('Action'), array(\n                $this-\u003eBootstrapHtml-\u003elink('Action 1', array()),\n                $this-\u003eBootstrapHtml-\u003elink('Action 2', array()),\n                'divider',\n                $this-\u003eBootstrapHtml-\u003elink('Action 3', array())\n            ))\n    ))) ;\necho $this-\u003eBootstrapForm-\u003eend() ;\n```\n\nWill output:\n\n```html\n\u003cform\u003e\n    \u003cdiv style=\"display:none;\"\u003e\n        \u003cinput type=\"hidden\" name=\"_method\" value=\"POST\"\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"control-group\"\u003e\n        \u003clabel for=\"ArticleText\" class=\"control-label\"\u003eSearch... \u003c/label\u003e\n        \u003cdiv class=\" input-prepend input-append\"\u003e\n            \u003cspan class=\"add-on\"\u003e\u003ci class=\"icon-search icon-black\"\u003e\u003c/i\u003e\u003c/span\u003e\n            \u003cinput name=\"data[Article][text]\" type=\"text\" id=\"ArticleText\"\u003e\n            \u003cdiv class=\"btn-group\"\u003e\n                \u003cbutton data-toggle=\"dropdown\" class=\"dropdown-toggle btn\"\u003e\n                    Action\n                    \u003cspan class=\"caret\"\u003e\u003c/span\u003e\n                \u003c/button\u003e\n                \u003cul class=\"dropdown-menu\"\u003e\n                    \u003cli\u003e\u003ca href=\"#\"\u003eAction 1\u003c/a\u003e\u003c/li\u003e\n                    \u003cli\u003e\u003ca href=\"#\"\u003eAction 2\u003c/a\u003e\u003c/li\u003e\n                    \u003cli class=\"divider\"\u003e\u003c/li\u003e\n                    \u003cli\u003e\u003ca href=\"#\"\u003eAction 3\u003c/a\u003e\u003c/li\u003e\n                \u003c/ul\u003e\n            \u003c/div\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e\n\u003c/form\u003e\n```\n\nBootstrapNavbarHelper\n=====================\n\nA new helper to easily create navigation bar in bootstrap style (http://getbootstrap.com/2.3.2/components.html#navbar).\n\nThe helper allow you to create navigation bars with brand block, links (with automatic active class), dropdown menus (and hover menu on dropdown), and other bootstrap stuff with custom options.\nAll the boostrap navbars (fixed, fixed, inverse, static, responsive) are availables using options.\n\nCopyright and license\n=====================\n\nCopyright 2013 Mikaël Capelle.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcakephp-bootstrap%2Fcakephp2-bootstrap2-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcakephp-bootstrap%2Fcakephp2-bootstrap2-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcakephp-bootstrap%2Fcakephp2-bootstrap2-helpers/lists"}