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
--- check if tmp files are configured properly with owner,permissions | |
--- sites/default/files have all the permissions |
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
$node_object = Node::load((int) $node_id); | |
$node_object->field_image->entity->url(); |
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
Select in Views --sort criteria - Total Views,Most recent view, Views today |
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
-- time stamp automatically gets time at the morning ie same time in From and to fields. | |
-- there should be a provision to change time with date. |
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
file_url(content.field_image[0]['#item'].entity.uri.value) |
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
1) install latest dev version of devel | |
2) change the no. of levels to show in devel config in the following file : - | |
devel/kint/kint/config.default.php - $_kintSettings['maxLevels'] = 4; reduce it. |
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
$query = \Drupal::service('entity_type.manager')->getStorage('user')->getQuery(); | |
$query->condition('roles', 'administrator'); | |
$query->execute(); |
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
$roles = \Drupal\user\Entity\Role::loadMultiple(); |
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
$uid = 4; //The user ID | |
$user = \Drupal\user\Entity\User::load($uid); | |
$roles = $user->getRoles(); |
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
$userCurrent = \Drupal::currentUser(); | |
$user = Drupal\user\Entity\User::load($userCurrent->id()); | |
$roles = $user->getRoles(); |
OlderNewer