Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F459902
AlmanacBindingsSearchEngineAttachment.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
AlmanacBindingsSearchEngineAttachment.php
View Options
<?php
final
class
AlmanacBindingsSearchEngineAttachment
extends
AlmanacSearchEngineAttachment
{
private
$isActive
;
public
function
setIsActive
(
$is_active
)
{
$this
->
isActive
=
$is_active
;
return
$this
;
}
public
function
getIsActive
()
{
return
$this
->
isActive
;
}
public
function
getAttachmentName
()
{
return
pht
(
'Almanac Bindings'
);
}
public
function
getAttachmentDescription
()
{
return
pht
(
'Get Almanac bindings for the service.'
);
}
public
function
willLoadAttachmentData
(
$query
,
$spec
)
{
$query
->
needProperties
(
true
);
if
(
$this
->
getIsActive
())
{
$query
->
needActiveBindings
(
true
);
}
else
{
$query
->
needBindings
(
true
);
}
}
public
function
getAttachmentForObject
(
$object
,
$data
,
$spec
)
{
$bindings
=
array
();
if
(
$this
->
getIsActive
())
{
$service_bindings
=
$object
->
getActiveBindings
();
}
else
{
$service_bindings
=
$object
->
getBindings
();
}
foreach
(
$service_bindings
as
$binding
)
{
$bindings
[]
=
$this
->
getAlmanacBindingDictionary
(
$binding
);
}
return
array
(
'bindings'
=>
$bindings
,
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 2:50 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
72005
Default Alt Text
AlmanacBindingsSearchEngineAttachment.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment