PHP 클래스 WC_REST_Product_Attributes_Controller

상속: extends WP_REST_Controller
파일 보기 프로젝트 열기: woocommerce/woocommerce

보호된 프로퍼티들

프로퍼티 타입 설명
$attribute string Attribute name.
$namespace string Endpoint namespace.
$rest_base string Route base.

공개 메소드들

메소드 설명
batch_items_permissions_check ( WP_REST_Request $request ) : boolean Check if a given request has access batch create, update and delete items.
create_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error Create a single attribute.
create_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean Check if a given request has access to create a attribute.
delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Delete a single attribute.
delete_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean Check if a given request has access to delete a attribute.
get_collection_params ( ) : array Get the query params for collections
get_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error Get a single attribute.
get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean Check if a given request has access to read a attribute.
get_item_schema ( ) : array Get the Attribute's schema, conforming to JSON Schema.
get_items ( WP_REST_Request $request ) : array Get all attributes.
get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean Check if a given request has access to read the attributes.
prepare_item_for_response ( obj $item, WP_REST_Request $request ) : WP_REST_Response Prepare a single product attribute output for response.
register_routes ( ) Register the routes for product attributes.
update_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error Update a single term from a taxonomy.
update_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean Check if a given request has access to update a attribute.

보호된 메소드들

메소드 설명
get_attribute ( integer $id ) : stdClass | WP_Error Get attribute data.
get_taxonomy ( WP_REST_Request $request ) : string Get attribute name.
prepare_links ( object $attribute ) : array Prepare links for the request.
validate_attribute_slug ( string $slug, boolean $new_data = true ) : boolean | WP_Error Validate attribute slug.

메소드 상세

batch_items_permissions_check() 공개 메소드

Check if a given request has access batch create, update and delete items.
public batch_items_permissions_check ( WP_REST_Request $request ) : boolean
$request WP_REST_Request Full details about the request.
리턴 boolean

create_item() 공개 메소드

Create a single attribute.
public create_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Request | WP_Error

create_item_permissions_check() 공개 메소드

Check if a given request has access to create a attribute.
public create_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean
$request WP_REST_Request Full details about the request.
리턴 WP_Error | boolean

delete_item() 공개 메소드

Delete a single attribute.
public delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error

delete_item_permissions_check() 공개 메소드

Check if a given request has access to delete a attribute.
public delete_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean
$request WP_REST_Request Full details about the request.
리턴 WP_Error | boolean

get_attribute() 보호된 메소드

Get attribute data.
protected get_attribute ( integer $id ) : stdClass | WP_Error
$id integer Attribute ID.
리턴 stdClass | WP_Error

get_collection_params() 공개 메소드

Get the query params for collections
public get_collection_params ( ) : array
리턴 array

get_item() 공개 메소드

Get a single attribute.
public get_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Request | WP_Error

get_item_permissions_check() 공개 메소드

Check if a given request has access to read a attribute.
public get_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean
$request WP_REST_Request Full details about the request.
리턴 WP_Error | boolean

get_item_schema() 공개 메소드

Get the Attribute's schema, conforming to JSON Schema.
public get_item_schema ( ) : array
리턴 array

get_items() 공개 메소드

Get all attributes.
public get_items ( WP_REST_Request $request ) : array
$request WP_REST_Request
리턴 array

get_items_permissions_check() 공개 메소드

Check if a given request has access to read the attributes.
public get_items_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean
$request WP_REST_Request Full details about the request.
리턴 WP_Error | boolean

get_taxonomy() 보호된 메소드

Get attribute name.
protected get_taxonomy ( WP_REST_Request $request ) : string
$request WP_REST_Request Full details about the request.
리턴 string

prepare_item_for_response() 공개 메소드

Prepare a single product attribute output for response.
public prepare_item_for_response ( obj $item, WP_REST_Request $request ) : WP_REST_Response
$item obj Term object.
$request WP_REST_Request
리턴 WP_REST_Response $response

register_routes() 공개 메소드

Register the routes for product attributes.
public register_routes ( )

update_item() 공개 메소드

Update a single term from a taxonomy.
public update_item ( WP_REST_Request $request ) : WP_REST_Request | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Request | WP_Error

update_item_permissions_check() 공개 메소드

Check if a given request has access to update a attribute.
public update_item_permissions_check ( WP_REST_Request $request ) : WP_Error | boolean
$request WP_REST_Request Full details about the request.
리턴 WP_Error | boolean

validate_attribute_slug() 보호된 메소드

Validate attribute slug.
protected validate_attribute_slug ( string $slug, boolean $new_data = true ) : boolean | WP_Error
$slug string
$new_data boolean
리턴 boolean | WP_Error

프로퍼티 상세

$attribute 보호되어 있는 프로퍼티

Attribute name.
protected string $attribute
리턴 string

$namespace 보호되어 있는 프로퍼티

Endpoint namespace.
protected string $namespace
리턴 string

$rest_base 보호되어 있는 프로퍼티

Route base.
protected string $rest_base
리턴 string