Comments (2)
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.
Alternatively, you can create a specific command, either from the webtools:
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)
- [RFC] Helpers for views HOT 1
- [ACL] Process DB Migration in setDbOffset HOT 1
- Laravel valet error HOT 2
- [Webtools] SeoController bug HOT 1
- Feature request - Ubiquity serve => Possibility to add php version to use as param HOT 2
- [console] Ubiquity new blog creates project but when i run with 127.0.0.1:8099 it gives error HOT 2
- [Framework::diSemantic(] undefined method Ubiquity\core\Framework::diSemantic() on config/config.php:22 HOT 2
- REST cache ArrayCache response OK but token no available HOT 6
- [RFC] [config] add env variables and profiles to config
- DAO::getAll() return last element of objects HOT 6
- bug on Admin webtools panel HOT 7
- webtools Manages composer dependencies does not work HOT 5
- [RFC] Nette latte templates compatibility HOT 5
- theme cant be installed from webtools HOT 3
- Documentation translations contributing HOT 10
- about acl with database HOT 3
- Connect to Microsoft Access HOT 4
- warning notice on 2.5.2 HOT 1
- [RFC] Support Swow Extension。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ubiquity.