Mixin_NextGen_Album_Instance_Methods

Provides instance methods for the album.

Defined (1)

The class is defined in the following location(s).

/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php  
  1. class Mixin_NextGen_Album_Instance_Methods extends Mixin 
  2. public function validation() 
  3. $this->validates_presence_of('name'); 
  4. $this->validates_numericality_of('previewpic'); 
  5. return $this->object->is_valid(); 
  6. /** 
  7. * Gets all galleries associated with the album 
  8. */ 
  9. public function get_galleries($models = FALSE) 
  10. $retval = array(); 
  11. $mapper = C_Gallery_Mapper::get_instance(); 
  12. $gallery_key = $mapper->get_primary_key_column(); 
  13. $retval = $mapper->find_all(array("{$gallery_key} IN %s", $this->object->sortorder), $models); 
  14. return $retval;