{"id":20684576,"url":"https://github.com/webbywe/veneer","last_synced_at":"2025-07-30T21:37:19.629Z","repository":{"id":91753150,"uuid":"130368999","full_name":"webbywe/veneer","owner":"webbywe","description":"Set of Drupal 8 service wrappers disguising some complex core functions ","archived":false,"fork":false,"pushed_at":"2018-04-22T03:28:02.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"8.x-5.x","last_synced_at":"2025-01-17T16:15:03.838Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webbywe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-20T13:54:20.000Z","updated_at":"2018-04-22T03:31:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"bed5a0bd-175f-4eb1-8ce0-9c84bb00f5c6","html_url":"https://github.com/webbywe/veneer","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/webbywe%2Fveneer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbywe%2Fveneer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbywe%2Fveneer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbywe%2Fveneer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webbywe","download_url":"https://codeload.github.com/webbywe/veneer/tar.gz/refs/heads/8.x-5.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242933891,"owners_count":20208912,"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-16T22:22:57.308Z","updated_at":"2025-03-10T21:53:30.863Z","avatar_url":"https://github.com/webbywe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Veneer /vəˈnir/\n=======================\n\nAn attractive appearance that covers or disguises something's true nature.\n\nWhat Is This?\n-------------\n\nThis is a Drupal 8 module for site building development purposes that is loosely\nbased on the idea of a Facade pattern for Drupal. It does not do anything on \nit's own when enabled. It provides several utility functions to a developer \nthrough the Services container.\n\nHow To Use The Examples\n-----------------------\n\nThe module allows for chainable functions to get output desired. \n\nThe render() function will return FALSE if during the course of chaining\na parameter or object required did not pass validation for that service. \nThis module is not set to throw Exceptions and will not kill an site. \nIt is responsibility of developer to perform necessary validations.  \n\nExamples for Developers\n-----------------------\n\nBelow are variables syntax examples for the available services.\n\n### Node\n```\nuse Drupal\\veneer\\Veneer;\n\nVeneer::node($id)-\u003erender();\n\n// Or access directly through Drupal Services.\n\n/** @var \\Drupal\\veneer\\VeneerNode $veneer_node */\n$veneer_node = \\Drupal::service('veneer.node');\n$veneer_node-\u003eload($id)-\u003erender();\n```\n\nRender the current node with default \"full\" display.\n```php \nVeneer::node()-\u003erender();\n```\n\nAdd the current node with \"default\" display to twig as a generic Veneer variable.\n\nSyntax for Twig: ```{{ veneer.nodes.[id].view }}```\n```php \nVeneer::node()-\u003etwig();\n\n```\n\nRender the current node and open a variable name \"veneer_node\" up to Twig.\n```php \nVeneer::node()-\u003etwig('veneer_node');\n```\n\nRender a node by id with default \"full\" display and assure it's an \"article\".\n```php \nVeneer::node([id =\u003e $id, type =\u003e 'article'])-\u003erender();\n```\n\nRender a node's teaser using a node id.\n```php \nVeneer::node($id)-\u003edisplay(’teaser')-\u003erender();\n```\n\nRender the field of current node.\n```php \nVeneer::node()-\u003efield(‘body')-\u003erender();\n```\n\nTODO\n-----------------------\n\n1. Add unit tests.\n\n2. Add more functions to access PITA data to retrieve. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbywe%2Fveneer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebbywe%2Fveneer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbywe%2Fveneer/lists"}