protected function getCropTypes() {
    $croptypes = [
      'hero',
      'hero_small',
    ];

    $options = [];

    foreach ($croptypes as $croptype) {
      $type = CropType::load($croptype);
      if ($type instanceof CropType) {
        $options[$type->id()] = $type->label();
      }
    }

    return $options;
  }
protected function getCropTypes() {
    $croptypes = [
      'hero',
      'hero_small',
    ];

    $options = [];

    foreach ($croptypes as $croptype) {
      $type = CropType::load($croptype);
      if ($type instanceof CropType) {
        $options[$type->id()] = $type->label();
      }
    }

    return $options;
  }
protected function getCropTypes ( ) { $ croptypes = [ 'hero' , 'hero_small' , ] ; $ options = [ ] ; foreach ( $ croptypes as $ croptype ) { $ type = CropType :: load ( $ croptype ) ; if ( $ type instanceof CropType ) { $ options [ $ type -> id ( ) ] = $ type -> label ( ) ; } } return $ options ; }
Function that gets the available crop types.

@return array
The croptypes.
Function that gets the available crop types .