Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

JCB! Power

interface ItemsInterface (Details)

namespace: VDM\Joomla\Interfaces\Data

@startuml

interface ItemsInterface  #Lavender {
  + ids() : array
  + table(string $table) : self
  + get(array $values, string $key = 'guid') : ?array
  + values(array $values, string $key = 'guid', ...) : ?array
  + set(array $items, string $key = 'guid') : bool
  + delete(array $values, string $key = 'guid') : bool
  + getTable() : string
}

note right of ItemsInterface::ids
  Get the IDs affected by the most recent actions batch.
This method returns the complete set of entity IDs affected by the most
recent persistence operations, regardless of whether the underlying
action was an INSERT, UPDATE, or a mixture of both.
Behavioral notes:
- IDs from INSERT and UPDATE operations are merged into a single set.
- The internal ID buckets for both operations are reset immediately
after retrieval to prevent cross-contamination between batches.
- Duplicate IDs are removed while preserving their original order.
- The returned IDs represent *all* entities affected during the
most recent execution cycle.

  since: 5.1.4
  return: array
end note

note right of ItemsInterface::table
  Set the current active table

  since: 3.2.2
  return: self
end note

note right of ItemsInterface::get
  Get list of items

  since: 3.2.2
  return: ?array
end note

note right of ItemsInterface::values
  Get the values

  since: 3.2.2
  return: ?array
  
  arguments:
    array $values
    string $key = 'guid'
    string $get = 'id'
end note

note right of ItemsInterface::set
  Set items

  since: 3.2.2
  return: bool
end note

note right of ItemsInterface::delete
  Delete items

  since: 3.2.2
  return: bool
end note

note right of ItemsInterface::getTable
  Get the current active table

  since: 3.2.2
  return: string
end note

@enduml

The Power feature in JCB allows you to write PHP classes and their implementations, making it easy to include them in your Joomla project. JCB handles linking, autoloading, namespacing, and folder structure creation for you.

By using the SPK (Super Power Key) in your custom code (replacing the class name in your code with the SPK), JCB will automatically pull the Power from the repository into your project. This makes it available in your JCB instance, allowing you to edit and include the class in your generated Joomla component.

JCB uses placeholders like [[[NamespacePrefix]]] and [[[ComponentNamespace]]] in namespacing to prevent collisions and improve reusability across different JCB systems.

You can also set the JCB powers path globally or per component under the Dynamic Integration tab, providing flexibility and maintainability.

To add this specific Power to your project in JCB:

Simply use this SPK:

Super---7212e4db_371f_4cfd_8122_32e9bb100d83---Power

Remember to replace the --- with ___ to activate this Power in your code.


Joomla Volunteer Portal Octoleo Llewellyn Telegram Mastodon X (Twitter) GitHub YouTube n8n Docker Hub Open Collective GPG Key