Posts by LRMiloef


    i'd like to create an component that will receive an external js method as property. This method will be triggered by vue.

    How can i do something like that? I want to tell my vue application to run the given callback method. I don't want to implement the method inside my vue-application because i want to use this application in different places of my project with different callback methods...


    i allready have one class per model. I only wrote it like this here in form, cause of simplicity :)

    I will take a look at this and let you know if it worked :-)



    i'm looking for an elegant way to save relations between different entities.

    Let me show you my scripts.php:

    As you can see, there are three Tables. One for my events, one for my teachers and one for creating the relation between teacher and events.

    My Models looks like that:

    Ok.. The teachers table contains a lot of entries. Now i want to create an controller method to add an event and assign one or more teachers to an event. How can i do this in an elegant way?

    I tried something like that:

    1. $event = new Event();
    2. $event->title = 'TestTitle';
    3. $event->teachers = .....

    Right... It's a lot of work to write for each model something like that:

    1. $util->createTable('@foobar_option', function($table) {
    2. $table->addColumn('id', 'integer', ['unsigned' => true, 'length' => 10, 'autoincrement' => true]);
    3. $table->addColumn('name', 'string', ['length' => 64, 'default' => '']);
    4. $table->addColumn('value', 'text');
    5. $table->addColumn('autoload', 'boolean', ['default' => false]);
    6. $table->setPrimaryKey(['id']);
    7. $table->addUniqueIndex(['name'], 'OPTION_NAME');
    8. });

    I'm looking for an solution that creates this code automatically.


    at the moment i'm sitting in front of an big extension with a lot of entities. We talk about 25. Now i created all the Models of these entities. The next step would be to create the script that creates the tables during the installation of the extension. As you can imagine, it will be a lot of work to write this script.

    I know from Symfony that there is a command that will create the migration script automatically. It something like doctrine:migrations:diff.

    That will create exactly what i need. Is there something similar to this in pagekit, too? It would be awsome!

    Maybe someone has a solution for that.

    I found the solution for my problem. You have to write following code into theme.js to get it running:

    1. (function($){
    2. $(function(){
    3. UIkit.notification('Hello world.');
    4. });
    5. })(jQuery);

    Wrapped in this construct you have access to UIkit.


    at the moment i'm trying to create a new theme based on uikit 3. I know it's still a beta version but they told on joomla days that it can be used, because it's stable.

    Now i need to know how to implement this in my theme.

    When i do something like this

    <?php $view->script('theme', 'theme:js/theme.js', ['uikit']

    it will use pagekit's internal uikit 2. How can i now use uikit 3 in my theme, when uikit 3 was installed by npm?

    Do i have to write an additional task in my webpack.config.js to pack it in my theme.js?

    I need to create an Update for my Extension. It's needed to create some new tables in the database. Now i found the "updates" hook in the Pagekit-Docs.

    There it's explained that in case of an update all earlier version hooks will be executed sequentially.

    Now i'd like to know if i also have to add the script for creating the table in the "install" hook or will the updates also be handled when i install the extension for the first time?