5 if ( ! defined(
'GRAVITYVIEW_DIR' ) ) {
26 public static $backend =
'multi';
44 if ( ! $entry instanceof
Entry ) {
47 $_entry->entries[ $entry[
'form_id'] ] = &
$entry;
63 if (
$entry = reset( $this->entries ) ) {
64 $_entry =
$entry->as_entry();
66 foreach ( $this->entries as
$entry ) {
67 $entry = $entry->as_entry();
68 $_entry[
'_multi'][ $entry[
'form_id'] ] =
$entry;
89 add_filter(
'gravityview/entry/slug', $callback =
function( $slug ) use ( &$slugs ) {
91 return implode(
',', $slugs );
94 foreach ( $this->entries as
$entry ) {
95 $permalink = call_user_func_array( array( $entry, __FUNCTION__ ), func_get_args() );
98 remove_filter(
'gravityview/entry/slug', $callback );
111 #[\ReturnTypeWillChange] 113 return isset( $this->entries[ $offset ] );
127 #[\ReturnTypeWillChange] 129 if ( ! $this->offsetExists( $offset ) ) {
132 return $this->entries[ $offset ];
144 #[\ReturnTypeWillChange] 146 gravityview()->log->error(
'The underlying multi entry is immutable. This is a \GV\Entry object and should not be accessed as an array.' );
157 #[\ReturnTypeWillChange] 159 gravityview()->log->error(
'The underlying multi entry is immutable. This is a \GV\Entry object and should not be accessed as an array.' );
If this file is called directly, abort.
__construct()
Initialization.
get_permalink(\GV\View $view=null, \GV\Request $request=null, $track_directory=true)
Return the link to this multi entry in the supplied context.
offsetGet( $offset)
ArrayAccess compatibility layer with a Gravity Forms entry array.
offsetSet( $offset, $value)
ArrayAccess compatibility layer with a Gravity Forms entry array.
offsetExists( $offset)
ArrayAccess compatibility layer with a Gravity Forms entry array.
as_entry()
Fake legacy template support.
offsetUnset( $offset)
ArrayAccess compatibility layer with a Gravity Forms entry array.
If this file is called directly, abort.
static from_entries( $entries)
Construct a multientry from an array of entries.
If this file is called directly, abort.
If this file is called directly, abort.
gravityview()
The main GravityView wrapper function.