Remove phraseanet services, update configuration

This commit is contained in:
Romain Neutron
2013-06-11 11:57:43 +02:00
parent 8ecc97e94e
commit 32c2d6154a
99 changed files with 1545 additions and 5049 deletions

View File

@@ -291,6 +291,12 @@ class databox_field implements cache_cacheableInterface
return self::$_instance[$instance_id];
}
public function hydrate(Application $app)
{
$this->app = $app;
$this->set_databox($this->app['phraseanet.appbox']->get_databox($this->sbas_id));
}
/**
*
* @param databox $databox
@@ -483,7 +489,7 @@ class databox_field implements cache_cacheableInterface
*/
public function get_label($code)
{
if (!array_key_exists($code, $this->labels)) {
if (null !== $code && !array_key_exists($code, $this->labels)) {
throw new InvalidArgumentException(sprintf('Code %s is not defined', $code));
}
@@ -996,7 +1002,7 @@ class databox_field implements cache_cacheableInterface
{
$vars = array();
foreach ($this as $key => $value) {
if (in_array($key, array('databox')))
if (in_array($key, array('databox', 'app')))
continue;
$vars[] = $key;
}
@@ -1004,17 +1010,6 @@ class databox_field implements cache_cacheableInterface
return $vars;
}
/**
*
* @return void
*/
public function __wakeup()
{
$this->set_databox($this->app['phraseanet.appbox']->get_databox($this->sbas_id));
return;
}
/**
* Part of the cache_cacheableInterface
*