7/9/2015 - 4:26 PM

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


  • 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