Standardize settings file naming and relocate documentation files Fix code quality violations from rsx:check Reorganize user_management directory into logical subdirectories Move Quill Bundle to core and align with Tom Select pattern Simplify Site Settings page to focus on core site information Complete Phase 5: Multi-tenant authentication with login flow and site selection Add route query parameter rule and synchronize filename validation logic Fix critical bug in UpdateNpmCommand causing missing JavaScript stubs Implement filename convention rule and resolve VS Code auto-rename conflict Implement js-sanitizer RPC server to eliminate 900+ Node.js process spawns Implement RPC server architecture for JavaScript parsing WIP: Add RPC server infrastructure for JS parsing (partial implementation) Update jqhtml terminology from destroy to stop, fix datagrid DOM preservation Add JQHTML-CLASS-01 rule and fix redundant class names Improve code quality rules and resolve violations Remove legacy fatal error format in favor of unified 'fatal' error type Filter internal keys from window.rsxapp output Update button styling and comprehensive form/modal documentation Add conditional fly-in animation for modals Fix non-deterministic bundle compilation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
58 lines
1.2 KiB
PHP
Executable File
58 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\RSpade\Core\View;
|
|
|
|
/**
|
|
* PageData - Store page-specific data for JavaScript access
|
|
*
|
|
* Allows views to add data to window.rsxapp.page_data via @rsx_page_data directive.
|
|
* Data is accumulated during view rendering and output when bundle is rendered.
|
|
*
|
|
* Usage in Blade views:
|
|
* @rsx_page_data(['user_id' => $user->id])
|
|
* @rsx_page_data(['key' => 'value', 'another' => $data])
|
|
*
|
|
* Access in JavaScript:
|
|
* const user_id = window.rsxapp.page_data.user_id;
|
|
*/
|
|
class PageData
|
|
{
|
|
/**
|
|
* Accumulated page data for current request
|
|
*
|
|
* @var array
|
|
*/
|
|
protected static array $data = [];
|
|
|
|
/**
|
|
* Add data to page_data object
|
|
*
|
|
* @param array $data Associative array of data to add
|
|
* @return void
|
|
*/
|
|
public static function add(array $data): void
|
|
{
|
|
static::$data = array_merge(static::$data, $data);
|
|
}
|
|
|
|
/**
|
|
* Get all accumulated page data
|
|
*
|
|
* @return array
|
|
*/
|
|
public static function get(): array
|
|
{
|
|
return static::$data;
|
|
}
|
|
|
|
/**
|
|
* Check if any page data has been set
|
|
*
|
|
* @return bool
|
|
*/
|
|
public static function has_data(): bool
|
|
{
|
|
return !empty(static::$data);
|
|
}
|
|
}
|