Right now, there's no extension point for the hold logic code.  There are a couple of approaches:

1.) We could define the hold logic as a service in one of the configured plugin managers, and then have everything that uses it pull it from there; then you would be able to configure a custom hold logic class just like other things.

2.) We could add setters to classes that rely on the hold logic -- so, for example, the SolrMarc record driver could have setHoldLogic/getHoldLogic methods, with getHoldLogic constructing a default \VuFind\ILS\Logic\Holds object if no override was set.  Then using an alternative class would be a matter of creating a custom factory for the SolrMarc class that injects a different Holds logic object.

Does that make sense?  I think #1 might be a bit less work for you to deal with, but it makes our huge configuration yet another notch larger.  Option #2 requires less default configuration, but it makes the custom configuration a little less convenient.  Let me know if you have thoughts/preferences, and I can help create the infrastructure you need to plug in your custom class if that would be useful.  (Hopefully I'll have a few minutes tomorrow).

- Demian

From: Chanel Wheeler [Chanel.Wheeler@yavapai.us]
Sent: Tuesday, February 26, 2013 4:14 PM
To: vufind-tech (vufind-tech@lists.sourceforge.net)
Subject: [VuFind-Tech] VuFind 2 - extending class from file not in module.config.php



Iím extending VuFind/ILS/Logic/Holds. I donít see anything in the VuFind module.config.php that I should add/customize for my local module. The reason this is of particular concern is because VuFind isnít picking up my local Holds.php with the extended class (I even tried putting gibberish in it and VuFind isnít barfing). Iíve deleted the cached Objects directory and restarted VuFind.  What else do I need to do?





Chanel Wheeler

Library Network Programmer/Analyst

Yavapai Library Network

1120 Commerce Dr.

Prescott, AZ  86305


Phone: (928) 442-5741


Open a help desk ticket