// Main module help for the contextual_image_widget_crop module.
case'help.page.contextual_image_widget_crop':
$output='';
$output.='<h2>'.t('About').'</h2>';
$output.='<p>'.t('Enhances the Image Widget Crop module when using the Media Library, to take
into account the context of the entity the Image Media entity gets added.').'</p>';
$output.='<p>'.t('Say you have a node type "blogpost", and it contains a Media entity reference
field for the blog post teaser image. On the "Manage display" page for blogpost,
you have configured the Media image to be displayed through the image_blog_post
image style (which uses for example a 4:3 crop type, from your list of available
crop types).').'</p>';
$output.='<p>'.t('When adding a Media image to your blog post, you only want to let editors set
the 4:3 crop type, since that will be the one used after saving the node. Other
crop types that might have been configured, are not relevant in this context, so
we do not expose them to the editor, to simplify their workflow.').'</p>';
$output.='<h3>'.t('Prerequisites').'</h3>';
$output.='<p>'.t('Have multiple crop types defined at Home > Administration > Configuration > Media > Crop types').'</p>';
$output.='<p>'.t('Have ImageCropWidget module configured at Home > Administration > Configuration > Media >Image Crop Widget settings').'</p>';
$output.='<p>'.t('Have one or more image styles configured that use cropping, at Home > Administration > Configuration > Media > Image styles').'</p>';
$output.='<h3>'.t('First, configure the form for the entity that has the Media attached:').'</h3>';
$output.='<p>'.t('Figure out which entity type(s) / bundle(s) have a Media reference field, for which you want to enable this functionality. E.g. if this is a Node entity of bundle "blogpost", to go Structure > Content Types > Blog post > "Manage form display"').'</p>';
$output.='<p>'.t('Find the Media field, and set the widget to "Contextual Image Widget Crop: Media library"').'</p>';
$output.='<h3>'.t('Next, configure the display for the entity that has the Media attached:').'</h3>';
$output.='<p>'.t('E.g. if this is a Node entity of bundle "blogpost", to go Structure > Content Types > Blog post > Manage display"').'</p>';
$output.='<p>'.t('For the Media field on that page, configure the formatter. E.g. "Thumbnail" format with image style "image_blog_post".').'</p>';
$output.='<h3>'.t('Finally, set our custom widget for the image field on the Media entity:').'</h3>';
$output.='<p>'.t('Go to Home > Administration > Structure > Media types > Image.').'</p>';
$output.='<p>'.t('For the "Media library" form display, set the widget for field "Image" to "Contextual ImageWidget crop". Configure as you would with the default ImageWidget crop widget.').'</p>';
$output.='<p>'.t('Now if you add a new instance of your entity type, you will open the Media Library to select an existing or new Media image. The ImageWidget crop tool will only show the relevant crop type (in our case, the one used by "image_blog_post", as described above).').'</p>';
$output.='<p>'.t(
'Visit the <a href=":project_link">Contextual Image Widget Crop project page</a>.',
$output.='<p>'.$this->t('Have multiple crop types defined at Home > Administration > Configuration > Media > Crop types').'</p>';
$output.='<p>'.$this->t('Have ImageCropWidget module configured at Home > Administration > Configuration > Media >Image Crop Widget settings').'</p>';
$output.='<p>'.$this->t('Have one or more image styles configured that use cropping, at Home > Administration > Configuration > Media > Image styles').'</p>';
$output.='<h3>'.$this->t('First, configure the form for the entity that has the Media attached:').'</h3>';
$output.='<p>'.$this->t('Figure out which entity type(s) / bundle(s) have a Media reference field, for which you want to enable this functionality. E.g. if this is a Node entity of bundle "blogpost", to go Structure > Content Types > Blog post > "Manage form display"').'</p>';
$output.='<p>'.$this->t('Find the Media field, and set the widget to "Contextual Image Widget Crop: Media library"').'</p>';
$output.='<h3>'.$this->t('Next, configure the display for the entity that has the Media attached:').'</h3>';
$output.='<p>'.$this->t('E.g. if this is a Node entity of bundle "blogpost", to go Structure > Content Types > Blog post > Manage display"').'</p>';
$output.='<p>'.$this->t('For the Media field on that page, configure the formatter. E.g. "Thumbnail" format with image style "image_blog_post".').'</p>';
$output.='<h3>'.$this->t('Finally, set our custom widget for the image field on the Media entity:').'</h3>';
$output.='<p>'.$this->t('Go to Home > Administration > Structure > Media types > Image.').'</p>';
$output.='<p>'.$this->t('For the "Media library" form display, set the widget for field "Image" to "Contextual ImageWidget crop". Configure as you would with the default ImageWidget crop widget.').'</p>';
$output.='<p>'.$this->t('Now if you add a new instance of your entity type, you will open the Media Library to select an existing or new Media image. The ImageWidget crop tool will only show the relevant crop type (in our case, the one used by "image_blog_post", as described above).').'</p>';
$output.='<p>'.$this->t(
'Visit the <a href=":project_link">Contextual Image Widget Crop project page</a>.',