BaseEventTypeController::updateUniqueCode PHP Method

updateUniqueCode() private method

Update Unique code for the event associated the specific procedures.
private updateUniqueCode ( $event )
    private function updateUniqueCode($event)
    {
        foreach ($this->unique_code_elements as $unique) {
            if ($event->eventType->class_name === $unique['event']) {
                foreach ($event->getElements() as $element) {
                    if (in_array(Helper::getNSShortname($element), $unique['element'])) {
                        $event_unique_code = UniqueCodeMapping::model()->findAllByAttributes(array('event_id' => $event->id));
                        if (!$event_unique_code) {
                            $this->createNewUniqueCodeMapping($event->id, null);
                        }
                    }
                }
            }
        }
    }
BaseEventTypeController