You are here

public function ParagraphsFrontendUIController::accessLibraryItem in Paragraphs frontend ui 8.2

Check if the settings form mode exists for this paragraph.

1 string reference to 'ParagraphsFrontendUIController::accessLibraryItem'
paragraphs_frontend_ui.routing.yml in ./paragraphs_frontend_ui.routing.yml
paragraphs_frontend_ui.routing.yml

File

src/Controller/ParagraphsFrontendUIController.php, line 216

Class

ParagraphsFrontendUIController
Controller for up and down actions.

Namespace

Drupal\paragraphs_frontend_ui\Controller

Code

public function accessLibraryItem($paragraph) {
  $paragraph = Paragraph::load($paragraph);
  extract($this
    ->getParentData($paragraph));
  if ($this
    ->parentIsLibraryItem($parent)) {
    return AccessResult::forbidden();
  }
  else {
    return AccessResult::allowed();
  }
}