Skip to content

Instantly share code, notes, and snippets.

@markpbaggett
Last active August 29, 2015 14:24
Show Gist options
  • Save markpbaggett/68958ae9b83358818bf9 to your computer and use it in GitHub Desktop.
Save markpbaggett/68958ae9b83358818bf9 to your computer and use it in GitHub Desktop.

Islandora Code Club

July 9, 2015

Agenda / Goals

  • Using the devel module
  • Look at what tuque is doing
  • Look at code and look at how it is on the site

Notes

  • Islandora Vagrant is tricky because you have to ssh into it's file system
  • Islandora Sample Content generator
    • good for spinning up sample objects quickly
  • Devel
    • Basic Image and Devel
      • Line 101
        • dpm - devel print message function
          • dpm($object, 'object');
          • use dpm anywhere to see what's going on
        • do you typically need to flush caches when you add a dpm
          • no
        • tuque doesn't spit out useful stuff
          • lots of recursions
        • doing a dpm on $object usually won't do anything
      • dpm on variable
        • can see how to do hooks on specific pages like theme hook on:
          • islandora_basic_image__testing_5
  • Use dpm on forms all the time
    • dpm($form)
    • very helpful on crazy forms
  • IDE / debuggers recommened:
    • PHP Storm
    • Free if you are an open source developer
    • very good for testing changing server side variables / data
  • Devel also helpful for telling you how long things are taking to run on your sever
    • page timer
    • memory usage
  • Tuque
    • islandora/tuque
    • object.php
      • calls on all the other files in that directroy
        • dpm($object->label, 'label')
        • dpm($object->models, 'models')
    • abstract means it's in another file
    • content
      • if you have a text datastream, can do stuff with them
    • basic image template file
      • getDatastream($islandora_object->id)); ?>
        • this doesn't work, but somthing like this will
      • just put your dpm in a php file if you are doing in a template file
      • with islandora_dublincore_object may have some things
      • dpm(islandora_object->id)
  • General questions
    • other functions devel module does besides dpm
      • ui things
        • Devel allows you to modify varialbes and execute php right on your sight
          • if you know something has a variable but doesn't have a config function, you can do it with php
        • Reinstall modules
          • does all you need with one click
      • devel generate
        • allows you to create dummy drupal content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment