Release of v3.2.2-alpha6
Add new subform classes. Fix registry class methods return type. Update all list and custom fields to use the new layouts.
This commit is contained in:
@@ -20,6 +20,8 @@ use VDM\Joomla\Data\Action\Update;
|
||||
use VDM\Joomla\Data\Action\Delete;
|
||||
use VDM\Joomla\Data\Item;
|
||||
use VDM\Joomla\Data\Items;
|
||||
use VDM\Joomla\Data\Subform;
|
||||
use VDM\Joomla\Data\MultiSubform;
|
||||
|
||||
|
||||
/**
|
||||
@@ -56,6 +58,12 @@ class Data implements ServiceProviderInterface
|
||||
|
||||
$container->alias(Items::class, 'Data.Items')
|
||||
->share('Data.Items', [$this, 'getItems'], true);
|
||||
|
||||
$container->alias(Subform::class, 'Data.Subform')
|
||||
->share('Data.Subform', [$this, 'getSubform'], true);
|
||||
|
||||
$container->alias(MultiSubform::class, 'Data.MultiSubform')
|
||||
->share('Data.MultiSubform', [$this, 'getMultiSubform'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,6 +165,36 @@ class Data implements ServiceProviderInterface
|
||||
$container->get('Data.Delete'),
|
||||
$container->get('Load')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Subform Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Subform
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getSubform(Container $container): Subform
|
||||
{
|
||||
return new Subform(
|
||||
$container->get('Data.Items')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The MultiSubform Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return MultiSubform
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getMultiSubform(Container $container): MultiSubform
|
||||
{
|
||||
return new MultiSubform(
|
||||
$container->get('Data.Subform')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
73
libraries/vendor_jcb/VDM.Joomla/src/Service/Table.php
Normal file
73
libraries/vendor_jcb/VDM.Joomla/src/Service/Table.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Componentbuilder\Table as DataTable;
|
||||
use VDM\Joomla\Componentbuilder\Table\Schema;
|
||||
|
||||
|
||||
/**
|
||||
* Table Service Provider
|
||||
*
|
||||
* @since 3.2.2
|
||||
*/
|
||||
class Table implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.2
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(DataTable::class, 'Table')
|
||||
->share('Table', [$this, 'getTable'], true);
|
||||
|
||||
$container->alias(Schema::class, 'Table.Schema')
|
||||
->share('Table.Schema', [$this, 'getSchema'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Componentbuilder Data Table Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return DataTable
|
||||
* @since 3.2.2
|
||||
*/
|
||||
public function getTable(Container $container): DataTable
|
||||
{
|
||||
return new DataTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Schema Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Schema
|
||||
* @since 3.2.2
|
||||
*/
|
||||
public function getSchema(Container $container): Schema
|
||||
{
|
||||
return new Schema(
|
||||
$container->get('Table')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user