Skip to content

1.1.0-rc.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@bastianallgeier bastianallgeier released this 25 May 12:42
7c15e2f

Features

Support for field method aliases #33

{
  "query": "site.description.kt"
}

New option to switch off authentication for KQL

<?php 

return [
  'kql' => [
    'auth' => false
  ]
];

Allow and block lists for custom methods and classes

<?php

return [
  'kql' => [
    'classes' => [
      'blocked' => [
        'Kirby\Cms\User'
      ]
    ],
    'methods' => [
      'allowed' => [
        'AlbumPage::cover'
      ],
      'blocked' => [
        'Kirby\Cms\App::version'
      ]
    ]
  ]
];

You can also use doc block comments in custom model methods, custom page methods, etc. to allow a method in KQL

class AlbumPage extends Page
{
  /**
   * @kql-allowed
   */
  public function cover()
  {
    return $this->images()->findBy('name', 'cover') ?? $this->image();
  }
}

Custom interceptor support

<?php

return [
  'kql' => [
    'interceptors' => [
      'Kirby\Cms\System' => 'SystemInterceptor'
    ]
  ]
];

New collection shortcut

{
  "query": "collection('notes')"
}

Fixes

  • Fixed pagination issue #28
  • Throw proper permission exception in interceptors
  • Fixed issue in license
  • Fixed test setup in sandbox