pauloamgomes/cockpit-cms-kint

This package is abandoned and no longer maintained. No replacement package was suggested.

Kint addon for Cockpit Headless CMS

0.1 2018-09-30 20:11 UTC

This package is auto-updated.

Last update: 2023-05-29 01:23:16 UTC


README

This addon extends Cockpit CMS (Next) core by providing debug functionality based on the Kint PHP Library.

Installation

Installation can be performed with or without php composer (But keep in mind that after downloaded/extracted the addon must be named Kint).

Without php composer

  1. Download zip and extract to 'your-cockpit-docroot/addons/Kint' (e.g. cockpitcms/addons/Kint)
  2. Install Kint dependency using composer
$ cd your-cockpit-docroot/addons/Kint
$ composer install

Using php composer

  1. Install addon using composer
$ cd your-cockpit-docroot/addons
$ composer create-project pauloamgomes/cockpit-cms-kint Kint

Configuration

No configuration is required.

Usage

The Cockpit Kint is a developer addon, to be used for example when implementing your own addons, there are two basic methods:

  1. Dump - will dump the variables to the screen
$this->app->module('kint')->dump($var1, $var2, ...);

Dump Example

  1. Console - will dump the variables to the browser console
$this->app->module('kint')->console($var1, $var2, ...);

Console Example

If the debug functions are called during an API request, the output will be logged using the HTTP headers instead:

Headers

Copyright and license

Copyright 2018 pauloamgomes under the MIT license.