??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/renovaid.co.uk/wp-content/plugins/latepoint/lib/abilities/agents/get-agents.php
⬅ Kembali
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class LatePointAbilityGetAgents extends LatePointAbstractAgentAbility {
protected function configure(): void {
$this->id = 'latepoint/get-agents';
$this->label = __( 'Get agents', 'latepoint' );
$this->description = __( 'Returns all agents (staff), optionally filtered by status.', 'latepoint' );
$this->permission = 'agent__view';
$this->read_only = true;
}
public function get_input_schema(): array {
return [
'type' => 'object',
'properties' => [
'status' => [
'type' => 'string',
'enum' => [ 'active', 'disabled' ],
'description' => __( 'Filter by status.', 'latepoint' ),
],
],
];
}
public function get_output_schema(): array {
return [
'type' => 'object',
'properties' => [
'agents' => [
'type' => 'array',
'items' => $this->agent_output_schema(),
],
'total' => [ 'type' => 'integer' ],
],
];
}
public function execute( array $args ) {
$query = new OsAgentModel();
if ( ! empty( $args['status'] ) ) {
$query->where( [ 'status' => sanitize_text_field( $args['status'] ) ] );
}
$agents = $query->order_by( 'last_name ASC, first_name ASC' )->get_results_as_models();
return [
'agents' => array_map( [ $this, 'serialize_agent' ], $agents ),
'total' => count( $agents ),
];
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
🐘 abstract-agent-ability.php
php
1.4 KB
2026-03-10 11:15
🐘 create-agent.php
php
2.2 KB
2026-03-10 11:15
🐘 delete-agent.php
php
1.4 KB
2026-03-10 11:15
🐘 disable-agent.php
php
1.4 KB
2026-03-10 11:15
🐘 enable-agent.php
php
1.3 KB
2026-03-10 11:15
🐘 get-agent-bookings.php
php
2.6 KB
2026-03-10 11:15
🐘 get-agent-revenue.php
php
1.9 KB
2026-03-10 11:15
🐘 get-agent-services.php
php
2.2 KB
2026-03-10 11:15
🐘 get-agent.php
php
1 KB
2026-03-10 11:15
🐘 get-agents.php
php
1.4 KB
2026-03-10 11:15
🐘 update-agent.php
php
2.1 KB
2026-03-10 11:15