{"id":16017259,"url":"https://github.com/njh/twig-html-helpers","last_synced_at":"2025-10-13T08:41:47.596Z","repository":{"id":6553011,"uuid":"7794686","full_name":"njh/twig-html-helpers","owner":"njh","description":"Rails style view helpers for HTML tags in PHP Twig","archived":false,"fork":false,"pushed_at":"2021-07-30T11:13:35.000Z","size":23,"stargazers_count":13,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-26T05:29:55.189Z","etag":null,"topics":["php","php-twig"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/njh.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-01-24T09:25:18.000Z","updated_at":"2022-12-27T22:39:46.000Z","dependencies_parsed_at":"2022-09-03T15:12:43.587Z","dependency_job_id":null,"html_url":"https://github.com/njh/twig-html-helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/njh/twig-html-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njh%2Ftwig-html-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njh%2Ftwig-html-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njh%2Ftwig-html-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njh%2Ftwig-html-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/njh","download_url":"https://codeload.github.com/njh/twig-html-helpers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njh%2Ftwig-html-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014327,"owners_count":26085492,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["php","php-twig"],"created_at":"2024-10-08T16:04:45.982Z","updated_at":"2025-10-13T08:41:47.553Z","avatar_url":"https://github.com/njh.png","language":"PHP","funding_links":[],"categories":["Twig"],"sub_categories":["Extensions"],"readme":"Twig HTML Helpers Extension\n===========================\n\n[![Build Status](https://travis-ci.org/njh/twig-html-helpers.svg?branch=master)](https://travis-ci.org/njh/twig-html-helpers)\n\nThis [PHP Twig] extension adds the following Rails style HTML helpers:\n\n* ```check_box_tag($name, $value = '1', $default = false, $options = array())```\n* ```content_tag($name, $content='', $options=array())```\n* ```hidden_field_tag($name, $default = null, $options = array())```\n* ```html_tag($name, $options=array())```\n* ```image_tag($src, $options=array())```\n* ```input_tag($type, $name, $value=null, $options=array())```\n* ```label_tag($name, $text = null, $options = array())```\n* ```labelled_text_field_tag($name, $default = null, $options = array())```\n* ```link_tag($title, $url=null, $options=array())```\n* ```password_field_tag($name = 'password', $default = null, $options = array())```\n* ```radio_button_tag($name, $value, $default = false, $options = array())```\n* ```reset_tag($value = 'Reset', $options = array())```\n* ```select_tag($name, $options, $default = null, $html_options = array())```\n* ```submit_tag($value = 'Submit', $options = array())```\n* ```text_area_tag($name, $default = null, $options = array())```\n* ```text_field_tag($name, $default = null, $options = array())```\n\n\nTo use them, first add the extension to your ```composer.json```:\n\n    \"require\": {\n        \"njh/twig-html-helpers\": \"dev-master\"\n    },\n\nThen load it into your environment:\n\n    $twig = new Twig_Environment();\n    $twig-\u003eaddExtension(new Twig_Extension_HTMLHelpers());\n\n\nYou can then use them in your Twig templates:\n\n    {{ link_tag('http://www.example.com/') }}\n\n\n\n[PHP Twig]: http://twig.sensiolabs.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjh%2Ftwig-html-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnjh%2Ftwig-html-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjh%2Ftwig-html-helpers/lists"}