public function LogController::add in Log entity 8
Provides the log submission form.
Parameters
\Drupal\log\LogTypeInterface $log_type: The log type entity for the log.
Return value
array A log submission form.
1 string reference to 'LogController::add'
File
- src/
Controller/ LogController.php, line 113 - Contains \Drupal\log\Controller\LogController.
Class
- LogController
- Returns responses for Log routes.
Namespace
Drupal\log\ControllerCode
public function add(LogTypeInterface $log_type) {
$log = $this
->entityManager()
->getStorage('log')
->create(array(
'type' => $log_type
->id(),
));
$form = $this
->entityFormBuilder()
->getForm($log);
return $form;
}