Skip to content

Kirby 5.0.4

$files->keys()

Returns an array of all keys

$files->keys(): array

Return type

array

This method modifies the existing $files object it is applied to and returns it again.

Parent class

Kirby\Cms\Files inherited from Kirby\Toolkit\Iterator

Examples

Example Files

  • document.pdf
  • numbers.xls
  • myimage.jpg
  • download.zip
dump($page->files()->keys());

/*
[
  'document.pdf',
  'numbers.xls',
  'myimage.jpg',
  'download.zip'
]
*/