public function verifySourceImageExists($hash, $organizationName, OutputInterface $output, Image $client)
    {
        if (!$this->rokkaHelper->validateImageHash($hash)) {
            $output->writeln($this->formatterHelper->formatBlock([
                'Error!',
                'The Image HASH "'.$hash.'" is not valid!',
            ], 'error', true));

            return false;
        }

        if ($this->rokkaHelper->imageExists($client, $hash, $organizationName)) {
            return true;
        }

        $output->writeln($this->formatterHelper->formatBlock([
            'Error!',
            'The SourceImage "'.$hash.'" has not been found in Organization "'.$organizationName.'"',
        ], 'error', true));

        return false;
    }
public function verifySourceImageExists($hash, $organizationName, OutputInterface $output, Image $client)
    {
        if (!$this->rokkaHelper->validateImageHash($hash)) {
            $output->writeln($this->formatterHelper->formatBlock([
                'Error!',
                'The Image HASH "'.$hash.'" is not valid!',
            ], 'error', true));

            return false;
        }

        if ($this->rokkaHelper->imageExists($client, $hash, $organizationName)) {
            return true;
        }

        $output->writeln($this->formatterHelper->formatBlock([
            'Error!',
            'The SourceImage "'.$hash.'" has not been found in Organization "'.$organizationName.'"',
        ], 'error', true));

        return false;
    }
public function verifySourceImageExists ( $ hash , $ organizationName , OutputInterface $ output , Image $ client ) { if ( ! $ this -> rokkaHelper -> validateImageHash ( $ hash ) ) { $ output -> writeln ( $ this -> formatterHelper -> formatBlock ( [ 'Error!' , 'The Image HASH "' . $ hash . '" is not valid!' , ] , 'error' , true ) ) ; return false ; } if ( $ this -> rokkaHelper -> imageExists ( $ client , $ hash , $ organizationName ) ) { return true ; } $ output -> writeln ( $ this -> formatterHelper -> formatBlock ( [ 'Error!' , 'The SourceImage "' . $ hash . '" has not been found in Organization "' . $ organizationName . '"' , ] , 'error' , true ) ) ; return false ; }
Verify that the given Source image exists, output the error message if needed.

@param string          $hash
@param string          $organizationName
@param OutputInterface $output
@param Image           $client

@return bool
Verify that the given Source image exists output the error message if needed .