# Layout column methods

****

Layout column methods are registered with the `layoutColumnMethods` extension.

## Default layout column methods

**For a full <a href="https://getkirby.com/docs/reference/objects/cms/layout-column">list of default layout column methods</a>, please check out the Reference.**

<info>Be aware that you cannot override these default layout column methods with any custom layout column method.</info>

## Getting started

You can extend the set of defined layout column methods in a plugin file.

```php "/site/plugins/layout-column-methods/index.php"
Kirby::plugin('my/plugin', [
    'layoutColumnMethods' => [
          'test' => function () {
              return 'layout column method';
          }
      ]
]);
```

This example shows the basic architecture of a layout column method. You define the method name with the key for the `layoutColumnMethods` extension array. `$this` in the callback function refers to the `$layoutColumn` object.

## Working with method arguments

In some cases it might be helpful to be able to pass arguments to the method:

You can define arguments for a method like this:

```php "/site/plugins/layout-column-methods/index.php"
Kirby::plugin('my/plugin', [
    'layoutColumnMethods' => [
        'hasBlockType' => function ($type) {
            return $this->blocks()->hasType($type);
        }
    ]
]);
```

And then use it like this:

```php
<?php $galleryExists = $layout->hasBlockType('gallery') ?>
```