public function workstation()
    {
        $response = [
            'success'     => false,
            'workstation' => uniqid('workstation-')
        ];

        $diagnostic = $this->getDiagnosticDataTable()->getDiagnostic($this->getId());

        if (isset($diagnostic)) {
            $response['success'] = true;
            $workstation = trim($diagnostic[PaginatedSqlStorage::DIAGNOSTIC_WORKSTATION]);
            if ($workstation) {
                $response['workstation'] = $workstation;
            }
        }

        $this->returnJson($response);
    }
public function workstation()
    {
        $response = [
            'success'     => false,
            'workstation' => uniqid('workstation-')
        ];

        $diagnostic = $this->getDiagnosticDataTable()->getDiagnostic($this->getId());

        if (isset($diagnostic)) {
            $response['success'] = true;
            $workstation = trim($diagnostic[PaginatedSqlStorage::DIAGNOSTIC_WORKSTATION]);
            if ($workstation) {
                $response['workstation'] = $workstation;
            }
        }

        $this->returnJson($response);
    }
public function workstation ( ) { $ response = [ 'success' => false , 'workstation' => uniqid ( 'workstation-' ) ] ; $ diagnostic = $ this -> getDiagnosticDataTable ( ) -> getDiagnostic ( $ this -> getId ( ) ) ; if ( isset ( $ diagnostic ) ) { $ response [ 'success' ] = true ; $ workstation = trim ( $ diagnostic [ PaginatedSqlStorage :: DIAGNOSTIC_WORKSTATION ] ) ; if ( $ workstation ) { $ response [ 'workstation' ] = $ workstation ; } } $ this -> returnJson ( $ response ) ; }
Gets the name of the workstation being tested
If current id is found on database, associated workstation is retrieve
Else an uniqid is generated
Gets the name of the workstation being tested If current id is found on database associated workstation is retrieve Else an uniqid is generated