Drupal & API: Core Database Tables

Drupal & API: Core Database Tables - Term Definition...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Term: What are the five core modules that are ALWAYS enabled in Drupal 7? Definition: The five core modules that are always enabled in Drupal: 1. user 2. block 3. node 4. filter 5. system
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Term: What tables are created by the user module? How do we find those tables quickly in the code? Definition: The following tables are installed and used by the user module. a. authmap; Stores distributed authentication mapping. b. role_permission; Stores the permissions assigned to user roles. c. role; Stores user roles. d. users; Stores user data. Drupal Admin UID = 1. e. users_roles; Maps users to roles. -- To learn what a module installs with regard to tables, look for and return lines with the string "schema" in that module's .install file. $ cd /web/root/ $ cat modules/user/user.install | grep schema RESULT: * Implements hook_schema(). function user_schema() { $schema['authmap'] = array( $schema['role_permission'] = array( $schema['role'] = array( $schema['users'] = array( $schema['users_roles'] = array( return $schema; * This function is valid for a database schema version 7000. // schema found. * Update the database to match the schema.
Image of page 2
Term: What tables are created by the block module? How do we find those tables quickly in the code? Definition: The following tables are installed and used by the block module: a. block Stores block settings, such as region and visibility settings. b. block_role Sets up access permissions for blocks based on user roles. c. block_custom; Stores contents of custom-made blocks. d. cache_block Cache table for the Block module to store already built blocks, identified by module, delta, and various contexts which may change the block, such as theme, locale, and caching mode defined for the block. -- To learn what a module installs with regard to tables, look into that module's .install file for lines with the string "schema" and return them. $ cd /web/root/ $ cat modules/block/block.install | grep schema RESULTS * Implements hook_schema(). function block_schema() { $schema['block'] = array( $schema['block_role'] = array( $schema['block_custom'] = array( $schema['cache_block'] = drupal_get_schema_unprocessed('syst em', 'cache'); $schema['cache_block']['description'] = 'Cache table for the Block module to store already built blocks, identified by module, delta, and various contexts
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
which may change the block, such as theme, locale, and caching mode defined for the block.'; return $schema; $schema = system_schema_cache_7054(); db_create_table('cache_block', $schema); * Update database to match Drupal 7 schema. Term: What tables are created by the node module? How do we find those tables quickly in the code? Definition: The following tables are installed and used by the node module: a. node; The base table for nodes. b. node_access; Identifies which realm/grant pairs a user must possess in order to view, update, or delete specific nodes. c. node_revision Stores information about each saved version of a {node}.
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern