{"id":17601363,"url":"https://github.com/alexeevdv/yii2-shortcodes","last_synced_at":"2025-04-30T08:57:56.613Z","repository":{"id":56944484,"uuid":"130334775","full_name":"alexeevdv/yii2-shortcodes","owner":"alexeevdv","description":null,"archived":false,"fork":false,"pushed_at":"2019-06-01T20:52:48.000Z","size":14,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T08:57:51.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexeevdv.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":"2018-04-20T08:40:28.000Z","updated_at":"2019-04-24T21:15:34.000Z","dependencies_parsed_at":"2022-08-21T07:50:53.997Z","dependency_job_id":null,"html_url":"https://github.com/alexeevdv/yii2-shortcodes","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeevdv%2Fyii2-shortcodes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeevdv%2Fyii2-shortcodes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeevdv%2Fyii2-shortcodes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeevdv%2Fyii2-shortcodes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexeevdv","download_url":"https://codeload.github.com/alexeevdv/yii2-shortcodes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251674576,"owners_count":21625644,"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-10-22T12:25:33.541Z","updated_at":"2025-04-30T08:57:56.574Z","avatar_url":"https://github.com/alexeevdv.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"yii2-shortcodes\n=================\n[![Build Status](https://travis-ci.org/alexeevdv/yii2-shortcodes.svg?branch=master)](https://travis-ci.org/alexeevdv/yii2-shortcodes) \n[![codecov](https://codecov.io/gh/alexeevdv/yii2-shortcodes/branch/master/graph/badge.svg)](https://codecov.io/gh/alexeevdv/yii2-shortcodes)\n![PHP 5.6](https://img.shields.io/badge/PHP-5.6-green.svg) \n![PHP 7.0](https://img.shields.io/badge/PHP-7.0-green.svg) \n![PHP 7.1](https://img.shields.io/badge/PHP-7.1-green.svg) \n![PHP 7.2](https://img.shields.io/badge/PHP-7.2-green.svg)\n\nYii2 behavior for rendering widgets with WordPress style shortcodes.\n\n\n## Installation\n\nThe preferred way to install this extension is through [composer](https://getcomposer.org/download/).\n\nEither run\n\n```bash\n$ php composer.phar require alexeevdv/yii2-shortcodes \"~0.1.0\"\n```\n\nor add\n\n```\n\"alexeevdv/yii2-shortcodes\": \"~0.1.0\"\n```\n\nto the ```require``` section of your `composer.json` file.\n\n## Configuration\n```php\nuse alexeevdv\\yii\\shortcodes\\ShortcodeBehavior;\n\n//...\n'components' =\u003e [\n    //...\n    'view' =\u003e [\n        'as shortcodeBehavior' =\u003e ShortcodeBehavior::class,\n        'map' =\u003e [\n            'feedback' =\u003e \\frontend\\widgets\\ContactForm::class,\n            'gallery' =\u003e [ \n                'class' =\u003e \\frontend\\widgets\\GalleryWidget::class,\n                'theme' =\u003e 'dark',\n            ],\n        ],\n    ],\n    //...\n],\n//...\n```\n\n## Usage\n\n```php\nnamespace frontend\\widgets;\n\nclass GalleryWidget extends \\yii\\base\\Widget\n{\n    public $id;\n    \n    public $theme;\n    \n    public function run()\n    {\n        // render your gallery here using $id and $theme\n    }\n}\n```\n\n```php\n//Anywhere in your layouts, views or rendered content:\n\n[gallery id=413]\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeevdv%2Fyii2-shortcodes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexeevdv%2Fyii2-shortcodes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeevdv%2Fyii2-shortcodes/lists"}