{"id":13669942,"url":"https://github.com/websemantics/social-field_type","last_synced_at":"2025-11-01T10:30:22.558Z","repository":{"id":150921778,"uuid":"48628729","full_name":"websemantics/social-field_type","owner":"websemantics","description":"The social field type provides a dropdown input of social netwroks","archived":false,"fork":false,"pushed_at":"2015-12-28T00:28:21.000Z","size":11251,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-26T08:42:33.760Z","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/websemantics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-27T01:19:01.000Z","updated_at":"2021-01-13T19:48:24.000Z","dependencies_parsed_at":"2023-04-17T01:11:52.325Z","dependency_job_id":null,"html_url":"https://github.com/websemantics/social-field_type","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websemantics%2Fsocial-field_type","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websemantics%2Fsocial-field_type/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websemantics%2Fsocial-field_type/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websemantics%2Fsocial-field_type/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/websemantics","download_url":"https://codeload.github.com/websemantics/social-field_type/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239278543,"owners_count":19612329,"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-08-02T09:00:26.118Z","updated_at":"2025-11-01T10:30:22.482Z","avatar_url":"https://github.com/websemantics.png","language":"PHP","funding_links":[],"categories":["Field Types"],"sub_categories":[],"readme":"# Social Field Type\n\nThe social field type provides a dropdown input of social netwroks.\n\n![demo](https://raw.githubusercontent.com/websemantics/social-field_type/master/resources/img/demo.gif)\n\nThis field type is using [Image-Select](https://github.com/websemantics/Image-Select), a select widget with image support for Single and Multi select HTML tags.\n\n## Introduction\n\n`websemantics.field_type.social`\n\nThe social field type provides a dropdown input of scoial accounts (facebook, youtube etc).\n\n## Configuration\n\n**Example Definition:**\n\n    protected $fields = [\n        'example' =\u003e [\n            'type'   =\u003e 'websemantics.field_type.social',\n            'config' =\u003e [\n                'default_value' =\u003e 'facebook',\n                'top_options'   =\u003e [\n                    'facebook',\n                    'youtube',\n                    'twitter'\n                ],\n                'handler'       =\u003e 'Websemantics\\SocialFieldType\\SocialFieldTypeOptions@handle'\n            ]\n        ]\n    ];\n\n### `default_value`\n\nThe default social account selected. Any valid social account id can be used (i.e. 'twitter'). The default value is `'facebook'`. \n\n### `top_options`\n\nAn array of social accounts to put at the top of the scoial dropdown. Any array of social ids can be used. There are no top options by default.\n\n### `handler`\n\nThe options handler callable string. Any valid callable class string can be used. The default value is `'Websemantics\\SocialFieldType\\SocialFieldTypeOptions@handle'`.\n\nThe handler is responsible for setting the available options on the field type instance.\n\n**NOTE:** This option can not be set through the GUI configuration.\n\n## Output\n\nThis field type returns the selected social account by default.\n\n### `name()`\n\nReturns the social account name\n\n    // Twig Usage\n    {{ entry.example.name }}\n    \n    // API usage\n    $entry-\u003eexample-\u003ename();\n\n### `translated($locale = null)`\n\n`$locale` - Any valid i18n language code. If none is provided the `config('app.locale')` value will be used.\n\nReturns the translated social account name in a specified locale.\n\n    // Twig Usage\n    {{ entry.example.translated('es') }}\n    \n    // API usage\n    $entry-\u003eexample-\u003etranslated('es');\n\n# Credits\n\nThis plaugin was modeled after [Country Field Type](https://github.com/anomalylabs/country-field_type)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsemantics%2Fsocial-field_type","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebsemantics%2Fsocial-field_type","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsemantics%2Fsocial-field_type/lists"}