Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 1110x 1110x 1110x 1110x 1110x 2264x 2264x 2264x 1110x 1110x | const MainImage = require('pim/form/common/main-image'); const UserContext = require('pim/user-context'); const MediaUrlGenerator = require('pim/media-url-generator'); /** * Display main image with user avatar * * @author Pierre Allard <pierre.allard@akeneo.com> * @copyright 2019 Akeneo SAS (http://www.akeneo.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class UserMainImage extends MainImage { /** * @{inheritdoc} */ getPath() { const filePath = UserContext.get('avatar').filePath; Eif (null === filePath || undefined === filePath) { return 'bundles/pimui/images/info-user.png'; } return MediaUrlGenerator.getMediaShowUrl(UserContext.get('avatar').filePath, 'thumbnail_small'); } } export = UserMainImage |