Jump to content

Neue Rituale

Members
  • Posts

    41
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Neue Rituale

  1. Hi Guys, i want to get a hooked page property into my graphql schema. Does anybody know how i can configure/implement this? /* the examble from https://processwire.com/docs/modules/hooks/#how-can-i-add-a-new-property-via-a-hook */ wire()->addHookProperty('Page::intro', function($event) { $page = $event->object; $intro = substr(strip_tags($page->body), 0, 255); $lastPeriodPos = strrpos($intro, '.'); if($lastPeriod !== false) $intro = substr($intro, 0, $lastPeriodPos); $event->return = $intro; }); I am playing around with the getQueryFields-Hook but I don't know what to do next: wire()->addHookAfter('ProcessGraphQL::getQueryFields', function ($event) { $types = $event->return; foreach($types as $type) { if($type['name'] === 'mytype') { /** @var ObjectType $pageType */ $pageType = $type['type']->getField('list')->getType()->getOfType(); $fields = $pageType->getFields(); // ???? // and here i will add some fields } } $event->return = $types; });
  2. Retrieve, collect and store geolocation data from external geocoding services. Under the hood, the module uses the great PHP Library geocoder-php by William Durand and Tobias Nyholm and adds some processwire magic. Download/Install Github: https://github.com/neuerituale/FieldtypeGeocoder Module directory: https://processwire.com/modules/fieldtype-geocoder/ Composer: composer require nr/fieldtypegeocoder v.1.0.1 - Add support for GraphQL-Module by dadish v.1.0.2 - Support Repeater v.1.0.3 - Add support for bitwise status search. v.1.0.4 - Fix php 8.2 warning #3 - Update composer file - Update leaflet version - Add short access to coordinates
  3. We add support for ProcessGraphQL with the additional module GraphQLFieldtypeOembed.
  4. Store, collect and update oembed data from external sources. This module uses the great PHP Library Essence by Félix Girault and adds some processwire magic. It is inspired by Ryan's example module FieldtypeEvents and the TextformatterOEmbed module by felixwahner. Thanks! Download & Install Github: https://github.com/neuerituale/FieldtypeOembed Modules directory: https://processwire.com/modules/fieldtype-oembed/ Composer: composer require nr/fieldtypeoembed
×
×
  • Create New...