Search

this lesson will install the Acquia pipelines client your local machine order execute pipelines commands This tool essential part developing testing and deploying applications Acquia Cloud order complete this lesson you will need web browser access Acquia Cloud Subscription Acquia Subscription user account with the Execute pipelines permission NIX terminal your local machine this lesson will…
Category: Tutorial Lesson
Related Product(s): Acquia Cloud, Acquia Cloud CD, Acquia Pipelines
Updated 8 months 2 weeks ago
Code Add the following lotusmodule file Implements hookmenu function lotusmenu items hello array title Hello Drupal description Landing Page for Lotus Module page callback lotushelloview access arguments array access content return items Page callback function function lotushelloview return Welcome website Code 1 Add the following lotusroutingyml file lotuscontent path hello defaults controller…
Category: Tutorial Lesson
Updated 6 months 1 week ago
Implementation Method Use hookmenu Use lotusroutingyml file Code Add the following lotusmodule file Implements hookmenu function lotusmenu items offers hot array title Offers Galore description Landing Page for Offers Page page callback lotusofferspage page arguments array 1 access arguments array access content return items Page callback function function lotusofferspage count return You will…
Category: Tutorial Lesson
Updated 6 months 1 week ago
Implementation Method custom function custom function Code The following code snippet can used wherever there requirement add new node Please replace the bold text with actual value global user node new stdClass node title YOUR TITLE node type YOURNODETYPE nodeobjectprepare node Sets some defaults Invokes hookprepare and hooknodeprepare node language LANGUAGENONE locale enabled node uid user uid…
Category: Tutorial Lesson
Updated 6 months 1 week ago
Implementation Method hookcron nodedeletemultiple hookcron EntityStorageInterface delete Code 1 Add the following lotusmodule file function lotuscron results dbselect node fields array nid condition created strtotime 30 days execute foreach results result nids result nid empty nids nodedeletemultiple nids 2 Run cron Code 1 Add the following lotusmodule file function lotuscron result Drupal…
Category: Tutorial Lesson
Updated 6 months 1 week ago
Implementation Method hookcron nodesave hookcron Node save Code First implement custom function that loads the set nodes you like unpublish The following example will load all nodes that are more than 30 days old function lotusloadoldnodes query new EntityFieldQuery query entityCondition entitytype node propertyCondition created strtotime 30 days result query execute result Query failed todo…
Category: Tutorial Lesson
Updated 6 months 1 week ago
Implementation Method nodeload nodesave hookENTITYTYPEupdate node set Code Add the following lotusmodule file Implements hookuserupdate user has Role named moderated append the words MODERATED USER titles all the nodes authored the user function lotususerupdate edit account category uid account uid role userhasrole moderated account role query new EntityFieldQuery query query entityCondition…
Category: Tutorial Lesson
Updated 6 months 1 week ago
Implementation Method taxonomytermsave create and save the term the specified vocabulary Drupal taxonomy Entity Term create then save the term into the specified vocabulary Code Add the following lotusmodule file function lotustermcreate newterm new stdClass newterm name Your term name Make sure you know the vocabulary Look lotusgetvocabularyidbyname for example vid lotusgetvocabularyidbyname…
Category: Tutorial Lesson
Updated 6 months 1 week ago
Implementation Method Load the node user object Then assign term the appropriate field Save the node user object FieldableEntityInterface set Drupal 7 you can only attach term reference fields Content Types and Users Drupal 8 you can attach term reference fields any entity type Code Place the following lotusmodule function lotusattachterm node nodeload nid nid the node the node update…
Category: Tutorial Lesson
Updated 6 months 1 week ago
Implementation Method hookblockinfo declare block and hookblockview define block content Use Plugins API declare block and add class define the content Code Add the following lotusmodule file Implements hookblockinfo function lotusblockinfo blocks welcome array info Welcome return blocks Implements hookblockview function lotusblockview delta block array switch delta case welcome block subject…
Category: Tutorial Lesson
Updated 6 months 1 week ago

Contact supportStill need assistance? Contact Acquia Support