Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Runner::get_command_short_desc( $command,  $resource )


Source Source

File: libraries/lifterlms-cli/src/Commands/Restful/Runner.php

	private static function get_command_short_desc( $command, $resource ) {

		$before = '';
		$after  = '';


		switch ( $command ) {
			case 'create':
				$before = 'Creates a new';
				break;

			case 'delete':
				$before = 'Deletes an existing';
				break;

			case 'diff':
				$before = 'Compare';
				$resource = self::pluralize_resource( $resource );
				$after = 'between environments';
				break;

			case 'edit':
				$before = 'Launches system editor to edit the';
				$after = 'content';
				break;

			case 'generate':
				$before = 'Generates some';
				$resource = self::pluralize_resource( $resource );
				break;

			case 'get':
				$before = 'Gets details about a';
				break;

			case 'list':
				$before = 'Gets a list of ';
				$resource = self::pluralize_resource( $resource );
				break;

			case 'update':
				$before = 'Updates an existing';
				break;
		}

		return trim( implode( ' ', array( $before, $resource, $after ) ) ) . '.';
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.