Docs »

Plugins »

Extension Points »

Resource Type

Name: Resource Type
Identifier (ID): cerb.resource.type

Manifest


		<extension point="cerb.resource.type">
			<id>cerb.resource.dataset.csv</id>
			<name>Dataset (.csv)</name>
			<class>
				<file>api/resources/types/cerb.resource.dataset.csv.php</file>
				<name>ResourceType_DatasetCsv</name>
			</class>
			<params/>
		</extension>

Code


class ExampleExtension extends Extension_ResourceType {
	/**
	 * @param Model_Resource $resource
	 * @return Model_Resource_ContentData
	 */
	public function getContentData($resource)

	/**
	 * @param Model_Resource $resource
	 * @param Model_Resource_ContentData $content_data
	 * @return bool
	 */
	public function getContentResource($resource, $content_data)

	public function validateContentData($fp, $extension_params, $error)

}

Extensions

Dataset (.csv) cerb.resource.dataset.csv
Dataset (.jsonl) cerb.resource.dataset.jsonl
Font cerb.resource.font
Image cerb.resource.image
Map Points cerb.resource.map.points
Map Properties cerb.resource.map.properties
Map cerb.resource.map
Portal Image cerb.resource.portal.image