-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1392 from tripal/tv4g0-issue1391-dos-line-endings
Tv4g0 issue1391 dos line endings
- Loading branch information
Showing
15 changed files
with
5,278 additions
and
5,278 deletions.
There are no files selected for viewing
46 changes: 23 additions & 23 deletions
46
tripal/src/Controller/TripalImporterPermissionsController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
<?php | ||
namespace Drupal\tripal\Controller; | ||
use Drupal\Core\Controller\ControllerBase; | ||
|
||
/** | ||
* Controller routines for the Tripal Module | ||
*/ | ||
class TripalImporterPermissionsController extends ControllerBase{ | ||
|
||
|
||
public function permissions() { | ||
$permissions = []; | ||
|
||
$importer_manager = \Drupal::service('tripal.importer'); | ||
$importer_defs = $importer_manager->getDefinitions(); | ||
|
||
foreach ($importer_defs as $plugin_id => $def) { | ||
<?php | ||
namespace Drupal\tripal\Controller; | ||
use Drupal\Core\Controller\ControllerBase; | ||
|
||
/** | ||
* Controller routines for the Tripal Module | ||
*/ | ||
class TripalImporterPermissionsController extends ControllerBase{ | ||
|
||
|
||
public function permissions() { | ||
$permissions = []; | ||
|
||
$importer_manager = \Drupal::service('tripal.importer'); | ||
$importer_defs = $importer_manager->getDefinitions(); | ||
|
||
foreach ($importer_defs as $plugin_id => $def) { | ||
$plugin_label = $def['label']->getUntranslatedString(); | ||
$permissions['use ' . $plugin_id . ' importer'] = [ | ||
'title' => t('Tripal Importer: Use the %label', ['%label' => $plugin_label]), | ||
'description' => t('Allow the user to import data using the %label. Note: you may also need to give the "Upload Files" permission for importers to work.', ['%label' => $plugin_label]), | ||
'restrict access' => TRUE, | ||
]; | ||
} | ||
|
||
return $permissions; | ||
} | ||
|
||
]; | ||
} | ||
|
||
return $permissions; | ||
} | ||
|
||
} |
Oops, something went wrong.