GithubHelp home page GithubHelp logo

Comments (2)

jcheron avatar jcheron commented on June 2, 2024

Hi @ChrissDeGrece
You can add a function to the app/config/bootstrap.php file

function _runTest($devtools,$config){
    $test=new \controllers\TestController();
    $test->index();
}

which will invoke the controller method to be requested.

You can then execute it from the console, using the bootstrap command:

Ubiquity bootstrap runTest

from ubiquity.

jcheron avatar jcheron commented on June 2, 2024

Alternatively, you can create a specific command, either from the webtools:
image

or from the devtools console

Ubiquity create-command issue -v=message -d="For issue 330"

The command created is located in the commands folder of the project, and its run method must be implemented:

class Issue extends AbstractCustomCommand {

	protected function getValue(): string {
		return 'message';
	}

	protected function getAliases(): array {
		return array();
	}

	protected function getName(): string {
		return 'issue';
	}

	protected function getParameters(): array {
		return [];
	}

	protected function getExamples(): array {
		return ['Sample use of issue'=>'Ubiquity issue message'];
	}

	protected function getDescription(): string {
		return 'For issue 330';
	}

	public function run($config, $options, $what, ...$otherArgs) {
		//TODO implement command behavior
		echo ConsoleFormatter::showInfo("Run issue command with message: $what\n");
	}
}

It is then executable by name:

Ubiquity issue "Test de message"

For more info, see in the documentation

from ubiquity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.