- // Auftragsliste erstellen
- public function createContractList () {
- if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erhält eine Auftragsliste.<br />\n",
- __CLASS__,
- __LINE__,
- $this->getCompanyName()
- ));
+ /**
+ * Checks wether the current user in registry is an employee in this company
+ *
+ * @return $isOwner Wether the current user is an employee in this company
+ */
+ public function ifUserIsEmployee () {
+ // Default is no employee
+ $isEmployee = false;
+
+ // Get result instance
+ $resultInstance = $this->getResultInstance();
+
+ // Is it set?
+ if ($resultInstance instanceof SearchableResult) {
+ // Result found so he is employee
+ $isEmployee = true;
+ } // END - if
+
+ // Return result
+ return $isEmployee;
+ }
+
+ //----------------------------------------------------------------------------
+ // From here is very old code which needs to be translated and changed heavily
+ //----------------------------------------------------------------------------
+
+ /**
+ * Intialize all lists
+ *
+ * @return void
+ * @todo Maybe we don't need these big lists anymore?! So we can deprecate/remove it
+ */
+ protected function initCompanyLists () {
+ // Employees
+ $this->employeeList = new FrameworkArrayObject("FakedEmployeeList");
+
+ // Ship yards
+ $this->shipyardList = new FrameworkArrayObject("FakedShipyardList");
+
+ // Contracts