Download the PHP package lullabot/proxy_block without Composer

On this page you can find all versions of the php package lullabot/proxy_block. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package proxy_block

Proxy Block

A Drupal module that provides a block plugin that can render any other block plugin the system. This allows for dynamic block selection and configuration through an administrative interface.

Overview

The proxy block is likely only useful for the A/B Blocks sub-module in the A/B Tests project.

Features

Use Cases

User Interface

Block Configuration

  1. Target Block Selection

    • Dropdown list of all available block plugins (excluding the proxy block itself)
    • Option to select "Do not render any block" to hide the block completely
    • AJAX-powered selection that immediately updates the configuration form
  2. Target Block Configuration

    • Dynamic configuration form that appears after selecting a target block
    • Shows the same configuration options as the target block would normally have
    • Updated in real-time via AJAX when changing target block selection
    • Displays informational message for blocks without configuration options
  3. Context Mapping (when applicable)
    • Appears for blocks that require contexts (e.g., node, user, term contexts)
    • Dropdown for each required context to map to available page contexts
    • Required context mappings are marked as mandatory
    • Validates that all required contexts are properly mapped

Administrative Experience

The administrative interface follows Drupal's standard block configuration patterns:

Technical Architecture

Core Components

ProxyBlock Plugin (src/Plugin/Block/ProxyBlock.php)

The main block plugin that implements the proxy functionality:

Render Logic

Initialization Phase

  1. Block Creation: Proxy block is instantiated by Drupal's block system
  2. Service Injection: Required services (BlockManager, Logger, CurrentUser) are injected
  3. Configuration Loading: Saved configuration is loaded from storage

Configuration Phase

  1. Form Building: Administrative configuration form is built
  2. Target Selection: Available block plugins are enumerated and presented
  3. AJAX Handling: Target block selection triggers AJAX callback
  4. Dynamic Form: Target block configuration form is dynamically loaded
  5. Context Discovery: Required contexts for target block are identified
  6. Validation: Form submission validates target block configuration and context mapping

Render Phase

  1. Target Block Creation:

  2. Context Mapping:

  3. Access Control:

  4. Content Generation:

  5. Cache Metadata:

Context Handling

The module handles context passing through a sophisticated mapping system:

Context Discovery

Context Mapping

Context Application

Cache Integration

The module properly handles cache metadata to ensure optimal performance:

Cache Contexts

Cache Tags

Cache Max Age

Error Handling

The module implements comprehensive error handling:

Plugin Creation Errors

Context Errors

Form Errors

Development Patterns

This module follows several advanced Drupal development patterns:

Functional Programming

Polymorphism Over Conditionals

Dependency Injection

Modern PHP Features

Installation

  1. Place module in modules/contrib/proxy_block or install via Composer
  2. Enable the module: drush en proxy_block
  3. Clear caches: drush cr
  4. The "Proxy Block" will be available in the block library

Configuration

No global configuration is required. Each proxy block instance is configured individually through the standard Drupal block configuration interface.

Compatibility

Limitations

Security Considerations

Performance

Contributing

This module is not open to public contributions.


All versions of proxy_block with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lullabot/proxy_block contains the following files

Loading the files please wait ...