instagram_feeds.install in Instagram Feeds 8
Same filename and directory in other branches
Install, update and uninstall functions for the node module.
File
instagram_feeds.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the node module.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\user\RoleInterface;
/**
* Implements hook_requirements().
*/
function instagram_feeds_requirements($phase) {
$requirements = [];
if ($phase === 'runtime') {
$config = Drupal::config('instagram_feeds.settings');
$client_id = $config
->get('client_id');
$client_secret = $config
->get('client_secret');
$status = $client_id && $client_secret ? t('set') : t('not set');
$requirements['instagram_feeds_app_credentials'] = [
'title' => t('Instagram Feeds'),
'value' => t('Instagram App Credentials are @status', [
'@status' => $status,
]),
];
}
return $requirements;
}
Functions
Name | Description |
---|---|
instagram_feeds_requirements | Implements hook_requirements(). |