# jetformbuilder/3.6.6/modules/framework/blocks-style-manager/path-url-trait.php

JetFormBuilder — Dynamic Blocks Form Builder, version 3.6.6. 79 lines.

- Page: https://pluginprobe.com/plugins/jetformbuilder/3.6.6/code/modules/framework/blocks-style-manager/path-url-trait.php
- Raw: https://pluginprobe.com/plugins/jetformbuilder/3.6.6/raw/modules/framework/blocks-style-manager/path-url-trait.php
- Modified: 2026-04-27T14:38:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetformbuilder/3.6.6/code/modules/framework/blocks-style-manager/path-url-trait.php#L10-L20`.

```php
<?php
namespace Crocoblock\Blocks_Style;

/**
 * Path and URL trait
 *
 * @since 1.0.0
 */
trait Path_Url_Trait {

	/**
	 * Module directory path.
	 *
	 * @since 1.0.0
	 * @access protected
	 * @var srting.
	 */
	protected $path;

	/**
	 * Module directory URL.
	 *
	 * @since 1.0.0
	 * @access protected
	 * @var srting.
	 */
	protected $url;

	/**
	 * Set module directory path
	 *
	 * @param string $path Path.
	 * @return self
	 */
	public function set_path( $path ) {
		$this->path = $path;
		return $this;
	}

	/**
	 * Get module directory path to file
	 *
	 * @param string $file File name.
	 * @return string
	 */
	public function get_path( string $file = '' ) {
		if ( ! $this->path ) {
			$this->path = trailingslashit( plugin_dir_path( __FILE__ ) );
		}

		return $this->path . $file;
	}

	/**
	 * Set module directory URL
	 *
	 * @param string $url URL.
	 * @return self
	 */
	public function set_url( $url ) {
		$this->url = $url;
		return $this;
	}

	/**
	 * Get module directory URL to file
	 *
	 * @param string $file File name.
	 * @return string
	 */
	public function get_url( string $file = '' ) {
		if ( ! $this->url ) {
			$this->url = trailingslashit( plugin_dir_url( __FILE__ ) );
		}

		return $this->url . $file;
	}
}

```
