예제 #1
0
	public function getSignature()
	{
		foreach(Log::getForItemId($this->getId()) as $log) {
			
			if (ItemStatus::UNREGISTER == $log['value']['logType']) {
				$ass = Log::find($log['id'])->getAttachments();
				if (array_key_exists('signature.png', $ass)) {
					
					/* 
					 * Store the file with prefix 'signature_' appending the
					 * item ID for this specific Log with extension 'png' if 
					 * it does not already exist in our Cache 
					 * $log['key']['0'] == item id for this log
					 */
					$filename = 'signature_'.$log['id'] . '.png';
					if (!Service::getService('cache')->exists($filename)) 
					{
						$config = Service::getService('config');
						Service::getService('cache')->writeRaw($filename, 
							$ass[$config['img.state.delivered']]->getRawData());
					}
					return Service::getService('cache')->getPath($filename);
				}
			}
		}
		return false;
	}
예제 #2
0
	static protected function getManager()
	{
		return Service::getService('user_manager');
	}
예제 #3
0
	static protected function getManager()
	{
		return Service::getService('document_manager');
	}