Class Key

Base class for attribute keys.

Concrete\Core\Foundation\Object
Extended by Concrete\Core\Attribute\Key\Key

Methods summary

public
public static
public
public
# getAttributeKeyName( )

Returns the name for this attribute key.

public string
# getAttributeKeyDisplayName( string $format = 'html' )

Returns the display name for this attribute (localized and escaped accordingly to $format)

public
# getAttributeKeyHandle( )

Returns the handle for this attribute key.

public
# getAttributeKeyDisplayHandle( )

Deprecated. Going to be replaced by front end display name.

public
# getAttributeKeyID( )

Returns the ID for this attribute key.

public
public
# isAttributeKeySearchable( )

Returns whether the attribute key is searchable.

public
# isAttributeKeyInternal( )

Returns whether the attribute key is internal.

public
# isAttributeKeyContentIndexed( )

Returns whether the attribute key is indexed as a "keyword search" field.

public
# isAttributeKeyAutoCreated( )

Returns whether the attribute key is one that was automatically created by a process.

public
# isAttributeKeyColumnHeader( )

Returns whether the attribute key is included in the standard search for this category.

public
# isAttributeKeyEditable( )

Returns whether the attribute key is one that can be edited through the frontend.

public
protected
# load( $akIdentifier, $loadBy = 'akID' )

Loads the required attribute fields for this instantiated attribute.

public
public
public static
# getInstanceByID( $akID )
public
# getAttributeType( )

Returns an attribute type object.

public
# getAttributeTypeHandle( )

Returns the attribute type handle.

public
public static
# __callStatic( $name, $arguments )
public static
# getAttributeKeyList( $akCategoryHandle, $filters = array() )

Returns a list of all attributes of this category.

public
# export( $axml, $exporttype = 'full' )
public static
# exportList( $xml )
public static
# getListByPackage( $pkg )

Note, this queries both the pkgID found on the AttributeKeys table AND any attribute keys of a special type installed by that package, and any in categories by that package. That's because a special type, if the package is uninstalled, is going to be unusable by attribute keys that still remain.

public static
# import( SimpleXMLElement $ak )
protected static
# addAttributeKey( $akCategoryHandle, $type, $args, $pkg = false )

Adds an attribute key.

public
public
# update( $args )

Updates an attribute key.

public
# duplicate( $args = array() )

Duplicates an attribute key.

public
# inAttributeSet( $as )
public
public
# reindex( string $table, array $columnHeaders, Concrete\Core\Attribute\Value\ValueList $attribs, mixed $rs = null )
public
# updateSearchIndex( $prevHandle = false )
public
# delete( )
public
public
# addAttributeValue( )

Adds a generic attribute record (with this type) to the AttributeValues table.

public
public
public
# render( $view = 'view', $value = false, $return = false )

Renders a view for this attribute key. If no view is default we display it's "view" Valid views are "view", "form" or a custom view (if the attribute has one in its directory) Additionally, an attribute does not have to have its own interface. If it doesn't, then whatever is printed in the corresponding $view function in the attribute's controller is printed out.

protected
# saveAttribute( Concrete\Core\Attribute\Value\CollectionValue|mixed $mixed, mixed $passedValue = false )

Calls the functions necessary to save this attribute to the database. If no passed value is passed, then we save it via the stock form. NOTE: this code is screwy because all code ever written that EXTENDS this code creates an attribute value object and passes it in, like this code implies. But if you call this code directly it passes the object that you're messing with (Page, User, etc...) in as the $attributeValue object, which is obviously not right. So we're going to do a little procedural if/then checks in this to ensure we're passing the right stuff.

public
public boolean|Concrete\Core\Error\Error
# validateAttributeForm( )

Validates the request object to see if the current request fulfills the "requirement" portion of an attribute.

public
public
public
public
public
# saveAttributeForm( $obj )

Saves an attribute using its stock form.

public
# setAttribute( $obj, $value )

Sets an attribute directly with a passed value.

public
# outputSearchHTML( )
public
# getKeyName( )
public
# getKeyHandle( )

Returns the handle for this attribute key.

public
# getKeyID( )

Returns the ID for this attribute key.

public static

Properties summary

protected $akID
#

Properties inherited from Concrete\Core\Foundation\Object

$error