panel.page.delete

Permission to delete a page

Target Data

ui

$this->target()->page()

action

$this->target()->page()

Example

<?php

// site/roles/editor.php
return [
  'name'        => 'Editor',
  'default'     => false,
  'permissions' => [
    '*'                 => true,
    'panel.page.delete' => false
  ]
];

Only allow deleting pages based with a specific template

// site/roles/editor.php
return [
  'name'        => 'Editor',
  'default'     => false,
  'permissions' => [
    '*'                 => true,
    'panel.page.delete' => function() {
      return $this->target()->page()->intendedTemplate() === 'project';
    }
  ]
];